add logging function exceptionDetails()