Errors caught using structured error handling (a CATCH block or "ROUTINE-LEVEL ON ERROR UNDO, THROW") may be written to the client log by using the ERROR-STACK-TRACE and DEBUG-ALERT attributes of the SESSION handle
The CallStack will be empty/null if the ERROR-STACK-TRACE attribute of the SESSION handle is false and the -errorstack isn't used.
Set the ERROR-STACK-TRACE attribute to true or use the -errorstack parameter to have Error objects set their CallStack.
For further clarification refer to Article: