ATLAS Offline Software
throwExcept.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MuonTesterTree_THROWEXCEPT_H
5 #define MuonTesterTree_THROWEXCEPT_H
6 
7 #include <exception>
8 #include <sstream>
9 
10 #define THROW_EXCEPTION(MESSAGE) \
11  { \
12  std::stringstream except_str{}; \
13  except_str<<__FILE__<<":"<<__LINE__<<" --- "; \
14  except_str<<MESSAGE; \
15  throw std::runtime_error(except_str.str()); \
16  }
17 #endif