define template correctly
Rethrow runtime errors