using System; namespace Microsoft.AspNetCore.NodeServices.HostingModels { /// /// Represents an exception caused by invoking Node.js code. /// public class NodeInvocationException : Exception { /// /// If true, indicates that the invocation failed because the Node.js instance could not be reached. For example, /// it might have already shut down or previously crashed. /// public bool NodeInstanceUnavailable { get; private set; } /// /// Creates a new instance of . /// /// A description of the exception. /// Additional information, such as a Node.js stack trace, representing the exception. public NodeInvocationException(string message, string details) : base(message + Environment.NewLine + details) { } /// /// Creates a new instance of . /// /// A description of the exception. /// Additional information, such as a Node.js stack trace, representing the exception. /// Specifies a value for the flag. public NodeInvocationException(string message, string details, bool nodeInstanceUnavailable) : this(message, details) { NodeInstanceUnavailable = nodeInstanceUnavailable; } } }