OfficeExtension.Error Object (JavaScript API for OneNote)
Applies to: OneNote Online
Represents errors that occur when you use the OneNote JavaScript API.
Properties
| Property | Type | Description |
|---|---|---|
| code | string | Gets a value that indicates the type of error. The value can be "InvalidArgument", "GeneralException", "ItemNotFound" or "UnsupportedOperationForObjectType". |
| debugInfo | string | Gets a value that indicates what happened when the error occurred. This value is only intended for use during development / debugging. |
| message | string | Gets a localized human readable string that corresponds to the error code. |
| name | string | Gets a value that is always "OfficeExtension.Error". |
| traceMessages | string[] | Gets an array of values that correspond to the instrumention messages set with context.trace(); |
Methods
| Method | Return Type | Description |
|---|---|---|
| toString() | string | Returns the error code and message values in the following format: "{0}: {1}", code, message. |
Method details
toString()
Returns the error code and message values in the following format: "{0}: {1}", code, message.
Syntax
error.toString()
Parameters
None.
Returns
string