diff options
| author | ruki <[email protected]> | 2016-03-29 10:56:16 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-03-29 10:56:38 +0800 |
| commit | 6e2aa359d0636c0224cccee04723408d9a3ae046 (patch) | |
| tree | 3b0607a30f2116fcfca7f00c6c3108d0d43b9389 /xmake/core/project/task.lua | |
| parent | 7edb31caaa3d1a0d58737324b6af85cb3b2d2c75 (diff) | |
add trycatch and remove on_failure for task
Diffstat (limited to 'xmake/core/project/task.lua')
| -rw-r--r-- | xmake/core/project/task.lua | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/xmake/core/project/task.lua b/xmake/core/project/task.lua index b4690c027..ee68c92c1 100644 --- a/xmake/core/project/task.lua +++ b/xmake/core/project/task.lua @@ -169,11 +169,10 @@ function task._interpreter() -- register api: set_task_menu() interp:api_register_set_values("task", "task", "menu") - -- register api: on_task_run(), on_task_before(), on_task_after(), on_task_failure() + -- register api: on_task_run(), on_task_before(), on_task_after() interp:api_register_on_script("task", "task", "run" , "after" - , "before" - , "failure") + , "before") -- set filter interp:filter_set(filter.init(function (variable) @@ -402,19 +401,6 @@ function task.run(name) end end - -- run on_failure if be failed? - if not ok and taskinfo.failure then - - -- call it in the sandbox - ok, errors = sandbox.load(taskinfo.failure) - if not ok then - utils.error(errors) - end - - -- failed - ok = false - end - -- ok? return ok end |
