Commits

Anonymous committed 213a580

Add new Ogre exception type MalformedInputException. Thrown to signal that loaded asset data was bad.

  • Participants
  • Parent commits 9a6abaf

Comments (0)

Files changed (1)

File OgreMain/include/OgreException.h

             ERR_FILE_NOT_FOUND,
             ERR_INTERNAL_ERROR,
             ERR_RT_ASSERTION_FAILED, 
-			ERR_NOT_IMPLEMENTED
+            ERR_NOT_IMPLEMENTED,
+            ERR_MALFORMED_INPUT
         };
 
         /** Default constructor.
 		RuntimeAssertionException(int inNumber, const String& inDescription, const String& inSource, const char* inFile, long inLine)
 			: Exception(inNumber, inDescription, inSource, "RuntimeAssertionException", inFile, inLine) {}
 	};
+	class _OgreExport MalformedInputException : public Exception
+	{
+	public:
+		MalformedInputException(int inNumber, const String& inDescription, const String& inSource, const char* inFile, long inLine)
+			: Exception(inNumber, inDescription, inSource, "MalformedInputException", inFile, inLine) {}
+	};
 
 
 	/** Class implementing dispatch methods in order to construct by-value
 		{
 			return RuntimeAssertionException(code.number, desc, src, file, line);
 		}
+		static MalformedInputException create(
+			ExceptionCodeType<Exception::ERR_MALFORMED_INPUT> code, 
+			const String& desc, 
+			const String& src, const char* file, long line)
+		{
+			return MalformedInputException(code.number, desc, src, file, line);
+		}
 
 	};