Comparing version 0.0.12 to 0.0.13
11
index.js
@@ -11,2 +11,3 @@ var debug = require('debug')('workflow:common') | ||
discoverTaskType: function(taskType) { | ||
@@ -102,2 +103,10 @@ var processRelativePath = path.join(process.cwd(), "/src/tasks/", taskType + ".js"); | ||
} | ||
if (workflowDefinition.onError) { | ||
var errorWfDef = context.get(workflowDefinition.onError); | ||
var errorWf = workflow.define(errorWfDef); | ||
context.error = err; | ||
return errorWf(context, function(err) { | ||
return orig(err); | ||
}) | ||
} | ||
return orig(err) | ||
@@ -122,3 +131,3 @@ } | ||
} catch(err) { | ||
throw err; | ||
//throw err; | ||
return done(err) | ||
@@ -125,0 +134,0 @@ } |
{ | ||
"name": "worksmith", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"description": "A purely functional workflow engine ", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
48924
39
1048