forked from Taritsyn/JavaScriptEngineSwitcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJsEngineException.cs
More file actions
45 lines (42 loc) · 1.37 KB
/
JsEngineException.cs
File metadata and controls
45 lines (42 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#if !NETSTANDARD1_3
using System;
using System.Runtime.Serialization;
#endif
namespace JavaScriptEngineSwitcher.ChakraCore.JsRt
{
/// <summary>
/// The exception that occurred in the workings of the JavaScript engine itself
/// </summary>
#if !NETSTANDARD1_3
[Serializable]
#endif
public sealed class JsEngineException : JsException
{
/// <summary>
/// Initializes a new instance of the <see cref="JsEngineException"/> class
/// </summary>
/// <param name="errorCode">The error code returned</param>
public JsEngineException(JsErrorCode errorCode)
: base(errorCode)
{ }
/// <summary>
/// Initializes a new instance of the <see cref="JsEngineException"/> class
/// with a specified error message
/// </summary>
/// <param name="errorCode">The error code returned</param>
/// <param name="message">The error message</param>
public JsEngineException(JsErrorCode errorCode, string message)
: base(errorCode, message)
{ }
#if !NETSTANDARD1_3
/// <summary>
/// Initializes a new instance of the <see cref="JsEngineException"/> class with serialized data
/// </summary>
/// <param name="info">The object that holds the serialized data</param>
/// <param name="context">The contextual information about the source or destination</param>
private JsEngineException(SerializationInfo info, StreamingContext context)
: base(info, context)
{ }
#endif
}
}