Mercurial > projects > mde
view mde/mergetag/exception.d @ 7:b544c3a7c9ca
Some changes to exceptions and a few more debug commands.
committer: Diggory Hardy <diggory.hardy@gmail.com>
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Wed, 16 Jan 2008 12:48:07 +0000 |
parents | 9a990644948c |
children | f63f4f41a2dc |
line wrap: on
line source
/******************************************* * Contains exception classes for MergeTag. * * Publically imports mde.exception. ******************************************/ module mde.mergetag.exception; public import mde.exception; /// Base MergeTag exception class. class MTException : mdeException { const override symbol = super.symbol ~ ".mergetag"; this (char[] msg) { super(msg); } this () {} } /** Thrown on file IO errors. */ class MTFileIOException : MTException { this () {} } /** Thrown on unknown format errors; when reading or writing and the filetype cannot be guessed. */ class MTFileFormatException : MTException { this () {} } /** Thrown when a string ID is parsed but cannot be found in the lookup table, hence cannot be used * as an ID. It should always be caught and handled gracefully (by ignoring the tag or section * involved). */ class MTStringIDException : MTException { this () {} } /** Thrown by addTag (in classes implementing dataset.DataSection) when a tag is read with an * unrecognised type field. */ class MTUnknownTypeException : MTException { this () {} this (char[] msg) { super (msg); } } /** Thrown by addTag (in classes implementing dataset.DataSection) when a data parsing error occurs * (really just to make whoever called addTag to log a warning saying where the error occured). */ class MTaddTagParseException : MTException { this () {} } /// Thrown by TypeView.parse on errors. class MTBadTypeStringException : MTException { this () {} } /// Thrown by TextWriter.indexTable (only in debug mode). class MTBadIDStringException : MTException { this () {} } /// Thrown by *Writer.write. class MTNoDataSetException : MTException { this (char[] msg) { super(msg); } }