4 #include <boost/exception/all.hpp>
\r
5 #include <boost/exception/errinfo_file_name.hpp>
\r
6 #include <boost/throw_exception.hpp>
\r
10 typedef boost::error_info<struct tag_arg_name_info, std::string> arg_name_info;
\r
11 typedef boost::error_info<struct tag_arg_value_info, std::string> arg_value_info;
\r
12 typedef boost::error_info<struct tag_arg_name_info, std::wstring> warg_name_info;
\r
13 typedef boost::error_info<struct tag_arg_value_info, std::wstring> warg_value_info;
\r
14 typedef boost::error_info<struct tag_msg_info, std::string> msg_info;
\r
15 typedef boost::error_info<struct tag_inner_info, std::exception_ptr> inner_info;
\r
16 typedef boost::error_info<struct tag_line_info, int> line_info;
\r
18 struct caspar_exception : virtual boost::exception, virtual std::exception
\r
20 caspar_exception(){}
\r
21 explicit caspar_exception(const char* msg) : std::exception(msg) {}
\r
24 struct io_error : virtual caspar_exception {};
\r
25 struct directory_not_found : virtual io_error {};
\r
26 struct file_not_found : virtual io_error {};
\r
27 struct file_read_error : virtual io_error {};
\r
29 struct invalid_argument : virtual caspar_exception {};
\r
30 struct null_argument : virtual invalid_argument {};
\r
31 struct out_of_range : virtual invalid_argument {};
\r
33 struct invalid_operation : virtual caspar_exception {};
\r
34 struct operation_failed : virtual caspar_exception {};
\r
36 struct not_supported : virtual caspar_exception {};
\r
37 struct not_implemented : virtual caspar_exception {};
\r
44 inline bool operator!=(const std::exception_ptr& lhs, const std::exception_ptr& rhs)
\r
46 return !(lhs == rhs);
\r
49 inline bool operator!=(const std::exception_ptr& lhs, std::nullptr_t)
\r
51 return !(lhs == nullptr);
\r
54 inline bool operator!=(std::nullptr_t, const std::exception_ptr& rhs)
\r
56 return !(nullptr == rhs);
\r