Skip to content

Access Violation in _HandleException

Why is my app throwing an access violation in System._HandleException? Because I wrote:

raise TMyException(SomeString);

…instead of:

raise TMyException.Create(SomeString);

I’m posting it here so that I can find it with Google the next time I make this mistake. :)

{ 2 } Comments

  1. Leonel | September 28, 2005 at 6:02 pm | Permalink

    Ouch, that mistake is surely a way to waste hours and hours staring at aparently perfectly good code, wondering where the problem is. I’ve been there, except it was a constructor of a regular class instead of an exception.

    Kind of worse, because the "owner" got typecasted to another class and would aparently work until it did not. Not fun.

  2. Robert MacLean | September 29, 2005 at 2:08 am | Permalink

    Been there, done that, bought the tee-shirt, bang head against desk, drank beer and when it was brought up in conversation later on we all laughed nerviously and quickly changed the topic.

Post a Comment

Your email is never published nor shared. Required fields are marked *

Bad Behavior has blocked 1846 access attempts in the last 7 days.

Close