NodeJsException Class
Represents an error raised by JavaScript code, or a failure of the Node.js process hosting it.
public sealed class NodeJsException : Exception- Inheritance
ExceptionNodeJsException
Constructors
| Name | Description |
|---|---|
| NodeJsException() | Initializes a new instance of NodeJsException. |
| NodeJsException(string) | Initializes a new instance of NodeJsException with the specified message. |
| NodeJsException(string, Exception) | Initializes a new instance of NodeJsException with the specified message and inner exception. |
NodeJsException overloads
NodeJsException()
NodeJsException.csInitializes a new instance of NodeJsException.
public NodeJsException()NodeJsException(string)
NodeJsException.csInitializes a new instance of NodeJsException with the specified message.
public NodeJsException(string message)Parameters
messagestring
NodeJsException(string, Exception)
NodeJsException.csInitializes a new instance of NodeJsException with the specified message and inner exception.
Properties
| Name | Description |
|---|---|
| ExitCode | Gets the exit code of the Node.js process when the error is caused by the process exiting. |
| JavaScriptErrorCode | Gets the code property of the JavaScript error (e.g. ENOENT for the errors of node:fs), converted to a string, or null when the error has no code. |
| JavaScriptErrorName | Gets the name of the JavaScript error (e.g. TypeError), or null when the error does not come from JavaScript code. |
| JavaScriptStack | Gets the JavaScript stack trace, if available. |
ExitCode
NodeJsException.csJavaScriptErrorCode
NodeJsException.csGets the code property of the JavaScript error (e.g. ENOENT for the errors of node:fs), converted to a string, or null when the error has no code.
public string? JavaScriptErrorCode { get; }