Ruby How to know what to rescue? -


i'm using eurovat gem check vat number.

eurovat.check_vat_number vat_number 

if run irb, receive this:

soap::faulterror: ms_unavailable         

(nothing appear after "from")

i want write begin rescue block rescue error, how know rescue?

i have tried rescue soap::faulterror didn't works

i found way after bit of testing:

rescue soap::faulterror => e     if e.message == "ms_unavailable"       # @todo handle service unavailable exception     end end 

Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -