ruby - How to get curb error stacktrace -


how can display entire stacktrace there error when using curb's curl::easy? i've tried looking @ http://www.rubydoc.info/github/taf2/curb/curl/err information, don't see anything.

begin   curl.perform rescue curl::err::curlerror => e   puts e.backtrace.inspect # or log end 

update

i tried didn't seem give me detailed error message. right i'm getting generic error message , it's hard debug

as tin man mentioned "rubydoc.info/github/taf2/curb/curl/err list of possible errors returned if curb has problem.".

to catch specific errors need rescue them individually. can see in example above trying rescue curl::err::curlerror. can add more errors follows:

rescue curl::err::curlerror => e   puts "curlerror: === " + e.backtrace.inspect rescue curl::err::accessdeniederror => e   puts "accessdenied: === " + e.backtrace.inspect rescue curl::err::timeouterror => e   puts "timeout: === " + e.backtrace.inspect ... end 

Comments

Popular posts from this blog

Java 8 + Maven Javadoc plugin: Error fetching URL -

css - SVG using textPath a symbol not rendering in Firefox -

order - Notification for user in user account opencart -