How to put application logs into the global ^ERRORS
InterSystems FAQ rubric
This can be done with TRY-CATCH:
#dim ex As%Exception.AbstractExceptionTRY {
//Code that causes an error
}
CATCH ex {
do ex.Log()
}If you use ^%ETN, call it from the BACK entry (BACK^%ETN).
Please also take a look at the related article: How to get application errors (^ERRORS) using a command
Discussion (0)0
Comments
Always a helpful way to add debugging code or long term exception logging!
Also, if you don't have an exception object and just want to log the stack for debugging purposes, you can use LOG^%ETN