dwyl / ampl

:iphone: :zap: Ampl transforms Markdown into AMP-compliant html so it loads super-fast!
GNU General Public License v2.0
58 stars 3 forks source link

bad image crashes ampl #19

Closed des-des closed 8 years ago

des-des commented 8 years ago

When the module image-size tries to find the dimensions of an image which it does not support it throws an error. This error then crashes ampl..

nelsonic commented 8 years ago

Bug...? sounds more like an undocumented feature... :wink:

des-des commented 8 years ago

Yeah.. maybe an enhancement to ampl would be to drop the error while logging that there was a problem?

nelsonic commented 8 years ago

@des-des it depends on how the ampl package is going to be used... If the error is being shown to a non-techical person in a browser it needs to be explained to them in English. but if the purpose is a command-line tool for developers it can be a simple console.warn ...

des-des commented 8 years ago

ok gonna go with console.warn for now. Maybe later can catch the errors higher up and expose them to the developer using ampl so that they can decide what to do.