- /*
- * 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
- */
+ /// \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 gdcmFormatUnexpected(const std::string &from,
+ const std::string &error = "Unexpected file format")
+ throw() : gdcmException( from, error ) { }
+};
+
+//-----------------------------------------------------------------------------
+/**
+ * \brief Invalid file format exception
+ */
+class GDCM_EXPORT gdcmFormatError : public gdcmFormatUnexpected
+{
+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