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

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -