1. Custom Task Error Handling - Displaying Custom Error Message
Hi,
I'm currently working on creating a custom task in VB6.
When it comes to error handling, the recommended error
handling procedure in MSDN is to bubble up the error to
the package event sink using oPackageEvent.onError().
Hence:
--- Sample Code Starts ---
Private Sub CustomTask_Execute(ByVal pPackage As Object,
ByVal pPackageEvents As Object, ByVal pPackageLog As
Object, pTaskResult As DTS.DTSTaskExecResult)
On Error GoTo errHandler
' Business logic
openConnection(param, param)
pTaskResult = DTSTaskExecResult_Success
Exit Sub
errHandler:
pTaskResult = DTSTaskExecResult_Failure
if Err.Number=xxxx Then closeConnection
' Bubble errors to the package eventsink
If Not pPackageEvents Is Nothing Then
pPackageEvents.OnError "CustomTask_Execute method
failed", Err.Number, Err.Source, Err.Description, "",
0, "", True
End If
Exit Sub
End Sub
--- Sample Code Ends ---
However, I notice that when error is raised, the specific
error message (Err.Description) will not be displayed on
the DTS Designer execution status dialog box. The only
message I'll get would be "The task reported failure on
execution".
I'm not sure if I have done it correctly. Anyone knows how
to get the custom error messages displayed?
Thanks!
Philip Tan
2. import and Export
3. Encoding for a field in Custom Web Publishing, CDML
4. enum
5. custom web publishing, simultaneous requests
6. Problem using sqlda with "UPDATE ... WHERE" in SE 5
7. Custom Web Publishing and HTTPS
8. ORACLE DISTRIBUTED QUERIES, DATETIME FIELDS , NULL VALUES
9. custom web publishing and related fields [fmp-field: database.fp5::fieldname]
10. Value lists with custom web database publishing
11. Custom web publishing question #3
12. Custom Web Publishing Question
13. FileMaker Pro 5 and custom web publishing