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

RuntimeError: Job not found on printer #17

Open
bararchy opened this issue Feb 11, 2015 · 5 comments
Open

RuntimeError: Job not found on printer #17

bararchy opened this issue Feb 11, 2015 · 5 comments

Comments

@bararchy
Copy link

Maybe instead of returning an exception is is better to return this in the status ?
as in:

job.status
=> :job_not_found
@bararchy
Copy link
Author

I see this is also happening when sending remote jobs:

[145] pry(main)> job3 = print.print_file("/home/unshadow/Downloads/the-complete-works-of-h-p-lovecraft.pdf")
RuntimeError: Success

@nehresma
Copy link
Owner

I agree that this is a better way to handle statuses. But the API change would break deployments so I haven't made the change.

@bararchy
Copy link
Author

I see, maybe then add a hash options when sending the print_file to specify what return value I expect ? that would also be cool and can be default for exception which wont heart running deployments

@nehresma
Copy link
Owner

That could work. Other APIs (particularly I'm thinking of HTTP REST APIs) do something semantically similar where the caller can request the return results in various formats.

This would be a bit different though in that a "format" choice would include a flow control operation -- exception.

I'll do some thinking about this.

@bararchy
Copy link
Author

Sounds good, thanks for giving this a thought :)

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