Skip to content

Commit

Permalink
throw uncaught process error #41
Browse files Browse the repository at this point in the history
  • Loading branch information
blooddy committed Mar 30, 2016
1 parent c6eb10a commit b143baa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/by/blooddy/crypto/process/Process.as
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ package by.blooddy.crypto.process {

import flash.events.EventDispatcher;
import flash.utils.getQualifiedClassName;

import by.blooddy.crypto.events.ProcessEvent;

[Event( type="by.blooddy.crypto.events.ProcessEvent", name="success" )]
Expand Down Expand Up @@ -94,7 +95,11 @@ package by.blooddy.crypto.process {
* @private
*/
private function fail(e:*):void {
super.dispatchEvent( new ProcessEvent( ProcessEvent.ERROR, false, false, e ) );
if ( super.hasEventListener( ProcessEvent.ERROR ) ) {
super.dispatchEvent( new ProcessEvent( ProcessEvent.ERROR, false, false, e ) );
} else {
throw e;
}
}

}
Expand Down

0 comments on commit b143baa

Please sign in to comment.