throw new phpbb_notification_exception($user->lang('BLA', $notification_type_name));

Also in the NestedSet PR I was asked to use default exceptions, so you could throw a `OutOfBoundsException` here
http://de1.php.net/manual/en/class.outofboundsexception.php