csivitu / code-executor

A CLI/library to execute code against test cases in various languages and obtain relevant results. :rocket:
https://www.npmjs.com/package/code-executor
MIT License
16 stars 2 forks source link

Return errors in CodeExecutor class #14

Closed roerohan closed 4 years ago

roerohan commented 4 years ago

Return errors in CodeExecutor class

Errors (if any) thrown from the by this.work() are not caught/handled in Worker.ts.

https://github.com/csivitu/code-executor/blob/b69766f9f629ba31f40afc8198356605041f541d/src/Worker.ts#L50-L58

The goal is to reject the promise in this.queue.on('global:completed') in the CodeExecutor class if the Worker ran into an error.

https://github.com/csivitu/code-executor/blob/b69766f9f629ba31f40afc8198356605041f541d/src/CodeExecutor.ts#L17-L27

alias-rahil commented 4 years ago

I will take this up.

roerohan commented 4 years ago

Cool, good luck @alias-rahil

roerohan commented 4 years ago

Resolved in #32