File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -49,13 +49,17 @@ extend(Raven.prototype, {
49
49
50
50
this . raw_dsn = dsn ;
51
51
this . dsn = utils . parseDSN ( dsn ) ;
52
- this . name = options . name || global . process . env . SENTRY_NAME || require ( 'os' ) . hostname ( ) ;
52
+ this . name =
53
+ options . name || global . process . env . SENTRY_NAME || require ( 'os' ) . hostname ( ) ;
53
54
this . root = options . root || global . process . cwd ( ) ;
54
55
this . transport = options . transport || transports [ this . dsn . protocol ] ;
55
56
this . sendTimeout = options . sendTimeout || 1 ;
56
57
this . release = options . release || global . process . env . SENTRY_RELEASE || '' ;
57
58
this . environment =
58
- options . environment || global . process . env . SENTRY_ENVIRONMENT || global . process . env . NODE_ENV || '' ;
59
+ options . environment ||
60
+ global . process . env . SENTRY_ENVIRONMENT ||
61
+ global . process . env . NODE_ENV ||
62
+ '' ;
59
63
60
64
// autoBreadcrumbs: true enables all, autoBreadcrumbs: false disables all
61
65
// autoBreadcrumbs: { http: true } enables a single type
@@ -385,6 +389,11 @@ extend(Raven.prototype, {
385
389
} ,
386
390
387
391
wrap : function ( options , func ) {
392
+ if ( ! this . installed ) {
393
+ utils . consoleAlertOnce (
394
+ 'Raven has not been installed, therefore no breadcrumbs will be captured. Call `Raven.config(...).install()` to fix this.'
395
+ ) ;
396
+ }
388
397
if ( ! func && typeof options === 'function' ) {
389
398
func = options ;
390
399
options = { } ;
You can’t perform that action at this time.
0 commit comments