Modified JSON code to send stacktrace + message + exception type.