comparison mde/file/exception.d @ 81:d8fccaa45d5f

Moved file IO code from mde/mergetag to mde/file[/mergetag] and changed how some errors are caught.
author Diggory Hardy <diggory.hardy@gmail.com>
date Fri, 29 Aug 2008 11:59:43 +0100
parents
children
comparison
equal deleted inserted replaced
80:ea58f277f487 81:d8fccaa45d5f
1 /* LICENSE BLOCK
2 Part of mde: a Modular D game-oriented Engine
3 Copyright © 2007-2008 Diggory Hardy
4
5 This program is free software: you can redistribute it and/or modify it under the terms
6 of the GNU General Public License as published by the Free Software Foundation, either
7 version 2 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
10 without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 See the GNU General Public License for more details.
12
13 You should have received a copy of the GNU General Public License
14 along with this program. If not, see <http://www.gnu.org/licenses/>. */
15
16 /// Base file exception classes
17 module mde.file.exception;
18
19 import mde.exception;
20
21 /// Base exception for all file exceptions
22 class fileException : mdeException
23 {
24 char[] getSymbol () {
25 return super.getSymbol ~ ".file";
26 }
27
28 this (char[] msg) {
29 super(msg);
30 }
31 }
32
33 /** Exception for errors finding, opening, closing, reading or writing files,
34 * but not for parsing content. */
35 class ioException : fileException
36 {
37 this (char[] msg) {
38 super(msg);
39 }
40 }
41
42 /** Exception for parsing, formatting and serializing content. */
43 class parseException : fileException
44 {
45 this (char[] msg) {
46 super(msg);
47 }
48 }