hugofirth / laravel-mailchimp

A composer package for the MailChimp API PHP class (as provided by MailChimp) which supports the Laravel 4 framework.
96 stars 27 forks source link

Catch error #17

Open fmendoza opened 10 years ago

fmendoza commented 10 years ago

Hi, I tried to catch like this but its not working:


catch(Mailchimp_Error $e)
{
  return Response::json(array('error' => true, 'message' => $e->getMessage()), 400);
}
hugofirth commented 10 years ago

@fmendoza Can you give me some more details? What is the code inside the try block. What input are you giving where you expect the error?

hadifarnoud commented 9 years ago

I'm also interested to see how try/catch would work. please include an example in README.