Quote:

? @ERROR+" "+@SERROR
May indicate where it is breaking




That won't work as expected. @ERROR returns a long, which will make the expression numeric. As a result you won't ever see the value of @SERROR.

Either explicitly cast the return value to a string, or coerce it:
Code:
CStr(@ERROR)+" "+@SERROR+@CRLF ; Explicit.
"["+@ERROR+"] "+@SERROR+@CRLF ; Coerced.