Add dedicated exception. It is not really used anywhere yet. Mostly copied/adapted from CiviCRM api/v3/Exception.php