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

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

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

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -