Preventing null pointer exception crash in case

$e->getCause() is null, and rethrowing the exception
in case of an unfamiliar cause code.
PLAT-924 #time 10m