Have been staring to this exception for while and have no clue whats going wrong.
Fatal Error: Wrong parameters for
Exception([string $exception [, long $code ]])
It seems pretty straight forward, the Exception expects a message and a optional code, though for some reason the code won't agree with me. Even when I drop the last parameter $e (for keeping the stacktrace), this same error pops up.
try {
// ...
} catch (Exception $e) {
throw new Exception('Client cannot be created', 0, $e);
}
Only when i omit both the code (0) and the previous exception ($e), the error is thrown correctly.
try {
// ...
} catch (Exception $e) {
throw new Exception('Client cannot be created');
}