如何在Stripe Php中捕获异常?

I need to catch the exception, but try catch does not catch anything.

try {
    return \Stripe\Transfer::create($array);
} catch (Exception $e) {
    var_dump($e);
}

I get the error:

In ApiRequestor.php line 181: You have insufficient funds in your Stripe account.....

Line 181 shows me the last method call with:

return new Error\InvalidRequest($msg, $param, $rcode, $rbody, $resp, $rheaders);

You forgot the backslash

try {
    return \Stripe\Transfer::create($array);
} catch (\Exception $e) { // <--- HERE
    var_dump($e);
}