We are using the following to catch any error while applying a schema update. Is there any way to retrieve the text of the error as well so I can write to my application log file?
DO ON ERROR UNDO, THROW:
CREATE ALIAS DICTDB FOR DATABASE histlog.
oService = NEW DataAdminService ("histlog"). /* HISTLOG DB */
oService:LoadSchemaChanges(cHistlogDf).
CATCH e AS Progress.Lang.Error:
oErrorhandler = NEW DataAdminErrorHandler().
oErrorHandler:Error(e). // will display error in message box
DELETE OBJECT e NO-ERROR.
END CATCH.
FINALLY:
DELETE OBJECT oService NO-ERROR.
DELETE ALIAS DICTDB.
END FINALLY.
END.
Roger, since you're using the SmartComponent Library you can also do
CATCH err AS Progress.Lang.Error:
Consultingwerk.Util.ErrorHelper:ShowErrorMessage (err) . /* gui for .net */
END CATCH.
or
CATCH err AS Progress.Lang.Error:
Consultingwerk.Util.ErrorHelper:ShowErrorMessageBox (err) . /* classic ABL gui */
END CATCH.
The Progress.Lang.Error object has a method GetMessage(index). Is that what you're after?
The Progress.Lang.Error object has a method GetMessage(index). Is that what you're after?
Roger, since you're using the SmartComponent Library you can also do
CATCH err AS Progress.Lang.Error:
Consultingwerk.Util.ErrorHelper:ShowErrorMessage (err) . /* gui for .net */
END CATCH.
or
CATCH err AS Progress.Lang.Error:
Consultingwerk.Util.ErrorHelper:ShowErrorMessageBox (err) . /* classic ABL gui */
END CATCH.
Thanks everyone...I have what I need. Have a great weekend.