thekid/rfc — Issue #14: RFC 0014: Dynamic exception loading
Author: thekid
Created: 2011-10-09 14:09:18+00:00
State: open

Scope of Change
====
A new core function raise() will be introduced.

Rationale
====
Loading all exceptions statically (by means of uses()) can impose
performance penalties.

Functionality
====

Prototype:

```
xp.null raise(string classname, string message) throws Throwable;

```

Example:

```php
printStackTrace();
}
?>
```

Implementation:

```php
getMessage());
// Bails out
}

return throw($class->newInstance($message));
}
?>
```

Dependencies
====
None.

Related documents
====
- Pascal raise statement
http://www.freepascal.org/docs-html/ref/refse65.html#x150-15700013.1

Comments
====
- friebe, Tue Jan 25 07:32:23 CET 2005
Will this work in PHP5?

- friebe, Tue Jan 25 07:35:52 CET 2005
Should we be able to pass varargs after the classname?