Export (0) Print
Expand All

Error.invalidOperation Function

Creates an Error object that represents the Sys.InvalidOperationException exception.

var err = Error.invalidOperation(message);

message

(Optional) An error message string. The value can be null. If message is null, a default message is used.

An Error object that has a name field added to the Error type definition.

The invalidOperation function lets you communicate that a method call failed for reasons other than invalid arguments. Use the invalidOperation function to create an Error object that represents a Sys.InvalidOperationException exception that can include a custom error message.

Community Additions

Show:
© 2015 Microsoft