File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ Basic setup and usage
1111
1212// Setup the exceptions handler to report errors when
1313// you call Exception.report() or window.onerror executes
14- exeptions .handler
14+ exceptions .handler
1515 .stacktraceUrl (" http://cdnjs.cloudflare.com/ajax/libs/stacktrace.js/0.6.0/stacktrace.js" )
1616 .html2canvasUrl (" http://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.js" )
1717 .postUrl (" http://localhost/handleException" )
Original file line number Diff line number Diff line change 1515 exceptions ,
1616 utilities ,
1717 _scopeOption ;
18+
19+ //polyfill for Object.create so we can support inheritance in ie8
20+ if ( typeof Object . create != 'function' ) {
21+ ( function ( ) {
22+ var F = function ( ) { } ;
23+ Object . create = function ( o ) {
24+ if ( arguments . length > 1 ) {
25+ throw Error ( 'Second argument not supported' ) ;
26+ }
27+ if ( o === null ) {
28+ throw Error ( 'Cannot set a null [[Prototype]]' ) ;
29+ }
30+ if ( typeof o != 'object' ) {
31+ throw TypeError ( 'Argument must be an object' ) ;
32+ }
33+ F . prototype = o ;
34+ return new F ( ) ;
35+ } ;
36+ } ) ( ) ;
37+ }
1838
1939 utilities = {
2040 /**
192212 * @return Custom exception. The type will be the function you provided in the config.exception property.
193213 */
194214 function createCustomException ( config ) {
195- if ( ArgumentException ) {
215+ if ( ArgumentException && ArgumentException . throwIf ) {
196216 ArgumentException . throwIf ( ! utilities . functionName ( config . exception ) , "Your exception constructor must have a name. See examples on github." )
197217 }
198218 createCustomException . _mixStaticFunctions ( config . exception ) ;
735755 if ( ! exception . error ( ) . stack && ! exceptions . handler . stacktraceUrl ( ) ) {
736756 o . stacktrace ( false ) ;
737757 }
738- if ( ! exceptions . handler . html2canvasUrl ( ) ) {
758+ if ( ! exceptions . handler . html2canvasUrl ( ) || ! window . getComputedStyle ) {
739759 o . screenshot ( false ) ;
740760 }
741761 if ( ! exceptions . handler . postUrl ( ) ) {
11581178 TypeException : TypeException ,
11591179 URIException : URIException ,
11601180 createCustomException : createCustomException ,
1161- handler : handler ,
1181+ handler : handler
11621182 } ;
11631183
11641184 window . exceptions = exceptions ;
You can’t perform that action at this time.
0 commit comments