-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add option to throw exceptions on errors #4
Comments
For regular function calls, the error is already customizable using the You are right that the behavior of errors that happen while initiating the library is currently hardcoded. If you think this is undesirable and can suggest a neat way of configuring this, send a pull request and I'll have a look. |
I've submitted a pull request for this issue #7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using OpenCPU to incorporate R code into an existing application, and it needs to be able to handle OpenCPU errors internally instead of having them generate alerts or log to the console. For instance, when seturl() fails, it uses alert() to raise a dialog box. And as the connection is made, messages are logged with console.log().
When getting started, and in pages, the way opencpu.js uses alert() and console.log() is very helpful, so I still think that should be the default behavior. Would it be appropriate to create a flags on the ocpu object that tells it whether to use alert() or throw exceptions, and whether to log debug messages?
If this would be acceptable, I can submit a pull request.
The text was updated successfully, but these errors were encountered: