`new $className` could be handled in the metadata instead - this allows specializing exceptions in case it's not possible