1234567891011121314151617181920212223242526272829 |
- using System;
- using Jint.Native.Error;
- namespace Jint.Runtime
- {
- public class JavaScriptException : Exception
- {
- private readonly object _errorObject;
- public JavaScriptException(ErrorConstructor errorConstructor) : base("")
- {
- _errorObject = errorConstructor.Construct(Arguments.Empty);
- }
- public JavaScriptException(ErrorConstructor errorConstructor, string message)
- : base(message)
- {
- _errorObject = errorConstructor.Construct(new object[] { message });
- }
- public JavaScriptException(object error)
- : base("")
- {
- _errorObject = error;
- }
- public object Error { get { return _errorObject; } }
- }
- }
|