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

download_image has no error handling #11

Open
ghost opened this issue Mar 27, 2012 · 1 comment
Open

download_image has no error handling #11

ghost opened this issue Mar 27, 2012 · 1 comment

Comments

@ghost
Copy link

ghost commented Mar 27, 2012

The download_image function should check if the response from yUML is a valid image. If it returns for instance a 500 Internal Server Error, the error message is saved as HTML into the .PNG file.

@ghost
Copy link
Author

ghost commented Mar 28, 2012

Same applies for establishing the connection. If trying to connect where a proxy connection is required, it fails with this pretty ugly error message:

C:/Ruby193/lib/ruby/1.9.1/net/http.rb:762:in `initialize': A connection attempt
failed because the connected party did not properly respond after a period of ti
me, or established connection failed because connected host has failed to respon
d. - connect(2) (Errno::ETIMEDOUT)
        from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:762:in `open'
        from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:762:in `block in connect'
        from C:/Ruby193/lib/ruby/1.9.1/timeout.rb:54:in `timeout'
        from C:/Ruby193/lib/ruby/1.9.1/timeout.rb:99:in `timeout'
        from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:762:in `connect'
        from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:755:in `do_start'
        from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:744:in `start'
        from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:557:in `start'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/umlify-1.2.6/lib/umlify/runner.
rb:64:in `download_image'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/umlify-1.2.6/lib/umlify/runner.
rb:43:in `run'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/umlify-1.2.6/lib/umlify.rb:47:i
n `execute'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/umlify-1.2.6/bin/umlify:5:in `<
top (required)>'
        from C:/Ruby193/bin/umlify:19:in `load'
        from C:/Ruby193/bin/umlify:19:in `<main>'

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

0 participants