adjusted own exception class to work with gcc 4.6