File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,17 @@ describe('TraceKit', function(){
157
157
TraceKit . report . subscribe ( subscriptionHandler ) ;
158
158
// should work with/without "Uncaught"
159
159
window . onerror ( 'Uncaught ReferenceError: foo is undefined' , 'http://example.com' , testLineNo ) ;
160
- window . onerror ( 'ReferenceError: foo is undefined' , 'http://example.com' , testLineNo )
160
+ window . onerror ( 'ReferenceError: foo is undefined' , 'http://example.com' , testLineNo ) ;
161
+ done ( ) ;
162
+ } ) ;
163
+
164
+ it ( 'should separate name, message for default error types on Opera Mini (see #546)' , function ( done ) {
165
+ subscriptionHandler = function ( stackInfo , extra ) {
166
+ assert . equal ( stackInfo . name , 'ReferenceError' ) ;
167
+ assert . equal ( stackInfo . message , 'Undefined variable: foo' ) ;
168
+ } ;
169
+ TraceKit . report . subscribe ( subscriptionHandler ) ;
170
+ window . onerror ( 'Uncaught exception: ReferenceError: Undefined variable: foo' , 'http://example.com' , testLineNo ) ;
161
171
done ( ) ;
162
172
} ) ;
163
173
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ var _slice = [].slice;
24
24
var UNKNOWN_FUNCTION = '?' ;
25
25
26
26
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types
27
- var ERROR_TYPES_RE = / ^ (?: U n c a u g h t ) ? ( (?: E v a l | I n t e r n a l | R a n g e | R e f e r e n c e | S y n t a x | T y p e | U R I ) E r r o r ) \ : ? ( .* ) $ / ;
27
+ var ERROR_TYPES_RE = / ^ (?: U n c a u g h t (?: e x c e p t i o n : ) ? ) ? ( (?: E v a l | I n t e r n a l | R a n g e | R e f e r e n c e | S y n t a x | T y p e | U R I ) E r r o r ) : ? ( .* ) $ / ;
28
28
29
29
function getLocationHref ( ) {
30
30
if ( typeof document === 'undefined' )
You can’t perform that action at this time.
0 commit comments