Fixed exceptions to reraise the error if none of excpected error types match