File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -503,6 +503,7 @@ var Promise = PDFJS.Promise = (function PromiseClosure() {
503
503
this .name = name ;
504
504
this .isRejected = false ;
505
505
this .error = null ;
506
+ this .exception = null ;
506
507
// If you build a promise and pass in some data it's already resolved.
507
508
if (data != null ) {
508
509
this .isResolved = true ;
@@ -611,6 +612,7 @@ var Promise = PDFJS.Promise = (function PromiseClosure() {
611
612
612
613
this .isRejected = true ;
613
614
this .error = reason || null ;
615
+ this .exception = exception || null ;
614
616
var errbacks = this .errbacks ;
615
617
616
618
for (var i = 0 , ii = errbacks .length ; i < ii ; i ++) {
@@ -629,7 +631,8 @@ var Promise = PDFJS.Promise = (function PromiseClosure() {
629
631
callback .call (null , data );
630
632
} else if (this .isRejected && errback ) {
631
633
var error = this .error ;
632
- errback .call (null , error );
634
+ var exception = this .exception ;
635
+ errback .call (null , error , exception );
633
636
} else {
634
637
this .callbacks .push (callback );
635
638
if (errback )
You can’t perform that action at this time.
0 commit comments