59 if (scriptStackTrace ==
null)
65 st =
"Script Stack Trace: " +
69 "Runtime Stacktrace:" +
88 return $
"{ErrorObject.ToSafeString(done)} at\n{StackTrace}\n{InnerError?.ToSafeString(done) ?? ""}";
110 return propName is
"StackTrace" or
"InnerError" or
"ErrorObject" ||
111 base.HasProperty(propName, caller);
Implements the Scope for the Script Engine.
Implements the Error Object Type.
override bool HasProperty(string propName, BadScope? caller=null)
Returns true if the object contains a given property or there exists an extension for the current Ins...
override BadClassPrototype GetPrototype()
BadRuntimeError(BadRuntimeError? innerError, BadObject obj, string stackTrace)
Creates a new Error Object.
static readonly BadClassPrototype Prototype
override BadObjectReference GetProperty(string propName, BadScope? caller=null)
Returns a Reference to the Property with the given Name.The Property Reference
string StackTrace
The Stacktrace of the Error.
BadObject ErrorObject
The Object that was thrown.
BadRuntimeError? InnerError
The Inner Error.
override string ToSafeString(List< BadObject > done)
static BadRuntimeError FromException(Exception e, string? scriptStackTrace=null)
Creates a BadRuntimeError from an Exception.
Gets thrown by the runtime.
The Base Class for all BadScript Objects.
virtual BadObjectReference GetProperty(string propName, BadScope? caller=null)
Returns a Reference to the Property with the given Name.
static readonly BadObject Null
The Null Value for the BadScript Language.
Implements the base functionality for a BadScript Reference.
static BadObjectReference Make(string refText, Func< BadObject > getter, Action< BadObject, BadPropertyInfo?>? setter=null, Action? delete=null)
Creates a new Reference Object.
Implements a Class Prototype for the BadScript Language.
Implements a Native Class Prototype.
Contains the Error Objects for the BadScript2 Language.
Contains Runtime Type Objects.
Contains the Runtime Objects.