C# Class Microsoft.Scripting.Actions.ErrorInfo

Encapsulates information about the result that should be produced when a OldDynamicAction cannot be performed. The ErrorInfo can hold one of: an expression which creates an Exception to be thrown an expression which produces a value which should be returned directly to the user and represents an error has occured (for example undefined in JavaScript) an expression which produces a value which should be returned directly to the user but does not actually represent an error. ErrorInfo's are produced by an ActionBinder in response to a failed binding.
Show file Open project: jschementi/iron Class Usage Examples

Public Methods

Method Description
FromException ( Expression exceptionValue ) : ErrorInfo

Creates a new ErrorInfo which represents an exception that should be thrown.

FromValue ( Expression resultValue ) : ErrorInfo

Creates a new ErrorInfo which represents a value which should be returned to the user.

FromValueNoError ( Expression resultValue ) : ErrorInfo

Crates a new ErrorInfo which represents a value which should be returned to the user but does not represent an error.

Private Methods

Method Description
ErrorInfo ( Expression value, ErrorInfoKind kind ) : System.Linq.Expressions

Private constructor - consumers must use static From* factories to create ErrorInfo objects.

Method Details

FromException() public static method

Creates a new ErrorInfo which represents an exception that should be thrown.
public static FromException ( Expression exceptionValue ) : ErrorInfo
exceptionValue System.Linq.Expressions.Expression
return ErrorInfo

FromValue() public static method

Creates a new ErrorInfo which represents a value which should be returned to the user.
public static FromValue ( Expression resultValue ) : ErrorInfo
resultValue System.Linq.Expressions.Expression
return ErrorInfo

FromValueNoError() public static method

Crates a new ErrorInfo which represents a value which should be returned to the user but does not represent an error.
public static FromValueNoError ( Expression resultValue ) : ErrorInfo
resultValue System.Linq.Expressions.Expression
return ErrorInfo