8 #ifndef META_OCEAN_INTERACTION_JS_SCRIPT_H
9 #define META_OCEAN_INTERACTION_JS_SCRIPT_H
51 bool run(v8::Handle<v8::Value>& returnValue, std::string& errorMessage);
57 inline bool isCompiled()
const;
This class implements an object holding a JavaScript code.
Definition: JSScript.h:29
bool run(v8::Handle< v8::Value > &returnValue, std::string &errorMessage)
Runs the entire script code.
bool isCompiled() const
Returns whether the script has been compiled successfully.
Definition: JSScript.h:72
bool compileAndRun(const std::string &code, std::string &errorMessage)
Compiles and runs a script code.
JSScript()=default
Creates a new script object.
static std::string extractErrorMessage(const v8::TryCatch &tryCatch)
Extracts the error message from a tryCatch object.
v8::UniquePersistent< v8::Script > script_
Script handle object.
Definition: JSScript.h:69
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15