I agree with till about using your own extension of the PEAR_Exception class.
on something completely different, but related, I encountered a vim error when opening
Error detected while processing modelines:
E518: Unknown option: */
I think you may need to expand the shortcut names out to:
/* vim: set noai expandtab tabstop=4 softtabstop=4 shiftwidth=4: */
just a hunch ;-)