Thanks to all for the advice. I was in debug hell and was looking for a way out. I figured out what I was doing wrong. Apparently when you are writing a logging tool and it gets an error logging to a table, and it keeps trying to log those errors to a table that it can't log errors to a table, it gets confused. I had code that called code that called the original code. Whoops.
I will take a look at all of the suggestions. Thanks again.