Open
Description
Hi, I'm having some difficulty understanding how exception handling would work. I'm having some trouble catching the below Exception for example. I'm thinking i'm perhaps in the wrong namespace and/or trying to catch the wrong Exception?
namespace DotMailer\Api\DataTypes;
$contact = new ApiContact();
$contact->email = $_POST['email'];
$contact->emailtype = $_POST['email_type'];
try {
$contact = $resources->PostContacts('invalid input');
} catch (Exception $e) {
echo $e->getMessage();
}
Metadata
Metadata
Assignees
Labels
No labels