How to put application logs into the global ^ERRORS
InterSystems FAQ rubric
This can be done with TRY-CATCH:
#dim ex As %Exception.AbstractException
TRY {
//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
Go to the original post written by @Megumi Kakechi
Discussion (1)1
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