Make sure exception is not null before retrieving stack trace
Make sure exception is not null before retrieving stack trace

Otherwise we can get a null reference error.

https://phabricator.endlessm.com/T13535

https://phabricator.endlessm.com/T13535fix

endlessm/eos-knowledge-lib,endlessm/eos-knowledge-lib,endlessm/eos-knowledge-lib,endlessm/eos-knowledge-lib