exception handler for solGS (copied from SGN)