From 15e8ff480e7a75f4dce8c8d41da157cf51bd3cb8 Mon Sep 17 00:00:00 2001 From: Tuowen Zhao Date: Mon, 26 Sep 2016 15:18:38 -0600 Subject: namespaced error --- include/chill_error.hh | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'include') diff --git a/include/chill_error.hh b/include/chill_error.hh index 7321e75..20a8362 100644 --- a/include/chill_error.hh +++ b/include/chill_error.hh @@ -6,23 +6,26 @@ * \brief CHiLL runtime exceptions */ -//! for loop transformation problem -struct loop_error : public std::runtime_error { - loop_error(const std::string &msg) : std::runtime_error(msg) {} -}; +namespace chill { + namespace error { + //! for loop transformation problem + struct loop : public std::runtime_error { + loop(const std::string &msg) : std::runtime_error(msg) {} + }; -//! for generic compiler intermediate code handling problem -struct ir_error : public std::runtime_error { - ir_error(const std::string &msg) : std::runtime_error(msg) {} -}; + //! for generic compiler intermediate code handling problem + struct ir : public std::runtime_error { + ir(const std::string &msg) : std::runtime_error(msg) {} + }; -//! for specific for expression to preburger math translation problem -struct ir_exp_error : public ir_error { - ir_exp_error(const std::string &msg) : ir_error(msg) {} -}; - -struct omega_error : public std::runtime_error { - omega_error(const std::string &msg) : std::runtime_error(msg) {} -}; + //! for specific for expression to preburger math translation problem + struct ir_exp : public ir { + ir_exp(const std::string &msg) : ir(msg) {} + }; + struct omega : public std::runtime_error { + omega(const std::string &msg) : std::runtime_error(msg) {} + }; + } +} #endif -- cgit v1.2.3-70-g09d2