Handling getPreviousException from the stack trace point of view