You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewError('Cannot initialize: No API key provided.');
5389
+
if(!config.key&&!config.targetUrl){
5390
+
thrownewError('Cannot initialize: No API key or target url provided.');
5391
5391
}
5392
-
if(!config.projectId){
5393
-
thrownewError('Cannot initialize: No project ID provided.');
5392
+
if(!config.projectId&&!config.targetUrl){
5393
+
thrownewError('Cannot initialize: No project ID or target url provided.');
5394
+
}
5395
+
if(typeofStackTrace==='undefined'){
5396
+
// Inform about missing dependency
5397
+
thrownewError('make sure you loaded “dist/stackdriver-errors-concat.js” or “dist/stackdriver-errors-concat.min.js”, or that you imported the “stacktrace-js” module');
@@ -5458,7 +5463,9 @@ if (!Array.prototype.forEach) {
5458
5463
payload.message+='\n';
5459
5464
// Reconstruct the stackframe to a JS stackframe as expected by Error Reporting parsers.
5460
5465
// stack[s].source should not be used because not populated when created from source map.
5461
-
payload.message+=[' at ',stack[s].getFunctionName(),' (',stack[s].getFileName(),':',stack[s].getLineNumber(),':',stack[s].getColumnNumber(),')'].join('');
5466
+
//
5467
+
// If functionName or methodName isn't available <anonymous> will be used as the name.
5468
+
payload.message+=[' at ',stack[s].getFunctionName()||'<anonymous>',' (',stack[s].getFileName(),':',stack[s].getLineNumber(),':',stack[s].getColumnNumber(),')'].join('');
5462
5469
}
5463
5470
that.sendErrorPayload(payload,callback);
5464
5471
},function(reason){
@@ -5473,7 +5480,8 @@ if (!Array.prototype.forEach) {
0 commit comments