view mde/mergetag/exception.d @ 4:9a990644948c

Many changes: upgraded to tango 0.99.4, reorganised mde/input, large changes to mde/mergetag and mde/init, separated off test/MTTest.d and more. committer: Diggory Hardy <diggory.hardy@gmail.com>
author Diggory Hardy <diggory.hardy@gmail.com>
date Sun, 06 Jan 2008 17:38:51 +0000
parents 18491334a525
children b544c3a7c9ca
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 {
    this (char[] msg) {
        super("MergeTag: " ~ 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);
    }
}