PHP extending Exception breaks getMessage -
when declaring custom exception, e.g:
final class testmeexception extends exception {}
it, somehow, breaks getmessage() functionality, causing return null. meaning:
$e1 = new exception('working'); $e2 = new testmeexception('not working'); print($e1->getmessage()); // prints: working print($e2->getmessage()); // prints: null
does know going on here?
you guys right. problem appeared when mocking exception via autobahn testsuite, without whitelisting new exception class (by default stubs out class under test , list of whitelisted classes/functions).
Comments
Post a Comment