Skip to content

Commit 941b23e

Browse files
committed
Added support for passed in exceptions where the exception is just a string
1 parent 046b020 commit 941b23e

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

dist/exceptionless.js

+2-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/exceptionless.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/exceptionless.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/exceptionless.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/services/DefaultErrorParser.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ export class DefaultErrorParser implements IErrorParser {
4646
throw new Error('Unable to parse the exceptions stack trace.');
4747
}
4848

49+
let message = typeof(exception) === 'string' ? <any>exception : undefined;
4950
return {
5051
type: stackTrace.name,
51-
message: stackTrace.message || exception.message,
52+
message: stackTrace.message || exception.message || message,
5253
stack_trace: getStackFrames(stackTrace.stack || [])
5354
};
5455
}

0 commit comments

Comments
 (0)