Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Catch script run errors #161

Open
nelliemckesson opened this issue Feb 22, 2017 · 1 comment
Open

Catch script run errors #161

nelliemckesson opened this issue Feb 22, 2017 · 1 comment

Comments

@nelliemckesson
Copy link
Contributor

nelliemckesson commented Feb 22, 2017

Find a way to catch errors running scripts even when the error occurs in the script header (e.g., in a require). Can we capture all std_out and std_err messages to the json log somehow?

@mattretzer
Copy link
Contributor

For ruby, a couple of thoughts:

  • We could wrap whole scripts in rescue blocks...
  • You can also redirect stderr &/or stdout; we could do that in line 1 or line 2 of a script for stderr; I did this in Validator here. But I had issues trying to do that and have it write to a logfile that another process is using during the script, so not sure we could write to the json log (unless we turned off stderr redirection write before logging at the end of the script)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants