change to start throwing exceptions, and have stack traces if GCC is used