API Documentation
ExecutionResult.h
1 // ExecutionResult.h
3 //
5 
6 namespace nkScripts
7 {
12  {
13  NO_ERROR = 0,
14  UNKNOWN,
18  RUNTIME,
20  } ;
21 
25  struct ExecutionResult final
26  {
29 
30  bool _success = true ;
31  } ;
32 }
nkScripts::EXECUTION_FAILURE_TYPE::MEMORY_ALLOCATION
@ MEMORY_ALLOCATION
A memory allocation failed.
nkScripts
Encompasses all API of component NilkinsScripts.
Definition: Environment.h:7
nkScripts::ExecutionResult::_success
bool _success
Whether execution went fine (true) or not (false).
Definition: ExecutionResult.h:30
nkScripts::EXECUTION_FAILURE_TYPE
EXECUTION_FAILURE_TYPE
Describes a type of script execution failure.
Definition: ExecutionResult.h:12
nkScripts::EXECUTION_FAILURE_TYPE::NO_ERROR
@ NO_ERROR
Execution went fine.
nkScripts::EXECUTION_FAILURE_TYPE::RUNTIME
@ RUNTIME
Runtime error.
nkMemory::String
Class holding information about a string, with ownership over the data.
Definition: String.h:22
nkScripts::ExecutionResult
Holds information about the execution result of a script in an environment.
Definition: ExecutionResult.h:26
nkScripts::ExecutionResult::_failureType
EXECUTION_FAILURE_TYPE _failureType
The failure type.
Definition: ExecutionResult.h:28
nkScripts::EXECUTION_FAILURE_TYPE::INTERPRETER_UNKNOWN
@ INTERPRETER_UNKNOWN
The environment interpreter is unknown.
nkScripts::ExecutionResult::_failureMessage
nkMemory::String _failureMessage
The description of the failure, if any.
Definition: ExecutionResult.h:27
nkScripts::EXECUTION_FAILURE_TYPE::UNKNOWN
@ UNKNOWN
Unknown place holder.
nkScripts::EXECUTION_FAILURE_TYPE::INTERPRETER_TYPE_MISMATCH
@ INTERPRETER_TYPE_MISMATCH
The environment interpreter and the script interpreter mismatched.
nkScripts::EXECUTION_FAILURE_TYPE::BYTECODE_NOT_READY
@ BYTECODE_NOT_READY
The script bytecode was not ready. Often due to unloaded scripts.