Changed to catch exceptions by ref and throw by value...huge memory leak.