if(msg == null){
throw new WrappedException(new ScriptusRuntimeException("invalid args to ask function, format: ask(question, [{who:who, timeout:duration}]"));
}
ContinuationPending pending = Context.getCurrentContext().captureContinuation();
pending.setApplicationState(new Ask(msg, who, timeout, rnd.nextLong()));
throw pending;
}