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

errors are undebuggable #3

Open
teo1978 opened this issue Dec 15, 2014 · 1 comment
Open

errors are undebuggable #3

teo1978 opened this issue Dec 15, 2014 · 1 comment

Comments

@teo1978
Copy link

teo1978 commented Dec 15, 2014

Whenever an error occurs, instead of a meaningful error message informing of the real cause of the error (e.g. error downloading map from tile server, or permission denied writing output file or whatever), an incomprehensible stack trace is printed which is of little or no help to the user to figure out what went wrong.

Example:
mapstatic map /..../maps/message66181_map.png --zoom=17 --lat=41.8879600 --lng=12.4661800 --width=900 --height=360 --provider=http://a.tile.stamen.com/toner/{z}/{x}/{y}.png

/var/lib/gems/1.9.1/gems/mini_magick-3.6.0/lib/mini_magick.rb:168:in create': MiniMagick::Invalid (MiniMagick::Invalid) from /var/lib/gems/1.9.1/gems/mini_magick-3.6.0/lib/mini_magick.rb:77:inread'
from /var/lib/gems/1.9.1/gems/mapstatic-0.0.1/lib/mapstatic/map.rb:144:in block (2 levels) in fill_image_with_tiles' from /var/lib/gems/1.9.1/gems/mapstatic-0.0.1/lib/mapstatic/map.rb:143:ineach'
from /var/lib/gems/1.9.1/gems/mapstatic-0.0.1/lib/mapstatic/map.rb:143:in each_with_index' from /var/lib/gems/1.9.1/gems/mapstatic-0.0.1/lib/mapstatic/map.rb:143:inblock in fill_image_with_tiles'
from /var/lib/gems/1.9.1/gems/mapstatic-0.0.1/lib/mapstatic/map.rb:140:in times' from /var/lib/gems/1.9.1/gems/mapstatic-0.0.1/lib/mapstatic/map.rb:140:infill_image_with_tiles'
from /var/lib/gems/1.9.1/gems/mapstatic-0.0.1/lib/mapstatic/map.rb:40:in render_map' from /var/lib/gems/1.9.1/gems/mapstatic-0.0.1/lib/mapstatic/cli.rb:48:inmap'
from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:27:in run' from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:120:ininvoke_command'
from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor.rb:363:in dispatch' from /var/lib/gems/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:439:instart'
from /var/lib/gems/1.9.1/gems/mapstatic-0.0.1/bin/mapstatic:7:in <top (required)>' from /usr/local/bin/mapstatic:23:inload'
from /usr/local/bin/mapstatic:23:in `

'

Actually, I get that exact error with that exact command randomly. I get it more than 50% of the times. And I can't tell why. Perhaps it's failing to retrieve the tiles from the provider? If that is the case, a clearer error must be given AND a configurable number of retries must be added to make it more robust (but that would be another issue: first we need a decent error reporting to be able to tell whether that is the case)

@teo1978
Copy link
Author

teo1978 commented Dec 15, 2014

(I can confirm that in my case the error above is due to failure to retrieve tails)

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

1 participant