共用方式為


DefaultEvents.OnError Method

Definition

This event is raised by a task or container when an error occurs.

public:
 virtual bool OnError(Microsoft::SqlServer::Dts::Runtime::DtsObject ^ source, int errorCode, System::String ^ subComponent, System::String ^ description, System::String ^ helpFile, int helpContext, System::String ^ idofInterfaceWithError);
public virtual bool OnError (Microsoft.SqlServer.Dts.Runtime.DtsObject source, int errorCode, string subComponent, string description, string helpFile, int helpContext, string idofInterfaceWithError);
abstract member OnError : Microsoft.SqlServer.Dts.Runtime.DtsObject * int * string * string * string * int * string -> bool
override this.OnError : Microsoft.SqlServer.Dts.Runtime.DtsObject * int * string * string * string * int * string -> bool
Public Overridable Function OnError (source As DtsObject, errorCode As Integer, subComponent As String, description As String, helpFile As String, helpContext As Integer, idofInterfaceWithError As String) As Boolean

Parameters

source
DtsObject

The object that caused the event.

errorCode
Int32

An integer that identifies the error message. This identifier should be unique when combined with the source parameter, so the source and errorCode combination should be unique. However, the errorCode alone is not expected to be unique.

subComponent
String

An arbitrary string that identifies the sub-module within a source. For example, the transform in a Pipeline task.

description
String

The text of the message.

helpFile
String

The path to the Help file that contains detailed information.

helpContext
Int32

Identifier of the topic in the Help file.

idofInterfaceWithError
String

A textual representation of the GUID of the interface that caused the error.

Returns

A Boolean that indicates whether the task should continue executing. A value of true indicates that the error should cause the task to cancel. A value of false indicates that the error should not stop the task from executing, but the task should continue.

Implements

Applies to