Fix thrown exception

Fixes "Call to undefined function RuntimeException()"