'Declaration Public Event Error As ScriptErrorEventHandler |
public event ScriptErrorEventHandler Error |
Event Data
The event handler receives an argument of type ScriptErrorEventArgs containing data related to this event. The following ScriptErrorEventArgs properties provide information specific to this event.
| Property | Description |
|---|---|
| Exception | Gets the System.Exception instance that DbScript throws. |
| Ignore | Gets or sets whether the current error will be ignored or not. |
| Length | Gets length of statement where an error occurred. |
| LineNumber | Gets number of the line where an error occurred. |
| LinePosition | Gets position in the line where an error occurred. |
| Offset | Gets offset of statement where an error occurred. |
| StatementType | Gets type of the statement that caused an error. |
| Text | Gets SQL statement where an error occurred. |
Remarks
This event can be generated by the Restore method when an error occurs during script execution. In the event handler you can choose whether to ignore the error and continue or to stop execution. The Devart.Common.ScriptErrorEventArgs object available in event handler provides information about the statement that initiated the error.
Example
See Also