- /*
- * Builds an file-related exception with minimal information: name of
- * the thrower method and error message
- *
- * @param from name of the thrower
- * @param error error description string
- */
- explicit gdcmFormatError(const std::string &from,
- const std::string &error = "Invalid file format error")
- throw() : gdcmException(from, error) {
- }
+ /// \brief Builds a file-related exception with minimal information:
+ /// name of the thrower method and error message
+ /// @param from name of the thrower
+ /// @param error error description string
+ explicit FormatUnexpected(const std::string &from,
+ const std::string &error = "Unexpected file format")
+ throw() : Exception( from, error ) { }
+};
+
+//-----------------------------------------------------------------------------
+/**
+ * \brief Invalid file format exception
+ */
+class GDCM_EXPORT FormatError : public FormatUnexpected
+{
+public:
+ /// \brief Builds a file-related exception with minimal information:
+ /// name of the thrower method and error message
+ /// @param from name of the thrower
+ /// @param error error description string
+ explicit FormatError(const std::string &from,
+ const std::string &error = "Invalid file format")
+ throw() : FormatUnexpected( from, error ) { }