comparison mde/exception.d @ 26:611f7b9063c6

Changed the licensing and removed a few dead files. Changed licensing to "GPL version 2 or later" to avoid future compatibility issues. Also a unittest fix to the previous commit. committer: Diggory Hardy <diggory.hardy@gmail.com>
author Diggory Hardy <diggory.hardy@gmail.com>
date Thu, 03 Apr 2008 18:15:02 +0100
parents 2c28ee04a4ed
children f985c28c0ec9
comparison
equal deleted inserted replaced
25:2c28ee04a4ed 26:611f7b9063c6
1 /* LICENSE BLOCK 1 /* LICENSE BLOCK
2 Part of mde: a Modular D game-oriented Engine 2 Part of mde: a Modular D game-oriented Engine
3 Copyright © 2007-2008 Diggory Hardy 3 Copyright © 2007-2008 Diggory Hardy
4 4
5 This program is free software; you can redistribute it and/or modify it under the terms of 5 This program is free software: you can redistribute it and/or modify it under the terms
6 the GNU General Public License, version 2, as published by the Free Software Foundation. 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.
7 8
8 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 9 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9 without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the GNU General Public License for more details. 11 See the GNU General Public License for more details.
11 12
12 You should have received a copy of the GNU General Public License along 13 You should have received a copy of the GNU General Public License
13 with this program; if not, write to the Free Software Foundation, Inc., 14 along with this program. If not, see <http://www.gnu.org/licenses/>. */
14 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
15 15
16 /// Contains the base class for all mde exceptions plus some exception classes. 16 /// Contains the base class for all mde exceptions plus some exception classes.
17 module mde.exception; 17 module mde.exception;
18 18
19 /** Base class for all mde Exceptions. 19 /** Base class for all mde Exceptions.
79 mdeException mE = new optionsLoadException(""); 79 mdeException mE = new optionsLoadException("");
80 assert (mE.getSymbol() == "mde.options", mE.getSymbol()); 80 assert (mE.getSymbol() == "mde.options", mE.getSymbol());
81 try { 81 try {
82 throw new mdeException ("ABC"); 82 throw new mdeException ("ABC");
83 assert (false); 83 assert (false);
84 } catch (Exception e) { 84 } catch (mdeException e) {
85 assert (e.msg == "mde: ABC", e.msg); 85 assert (e.msg == "ABC", e.msg);
86 assert (e.prefixedMsg == "mde: ABC", e.prefixedMsg);
86 } 87 }
87 88
88 logger.info ("Unittest complete."); 89 logger.info ("Unittest complete.");
89 } 90 }
90 } 91 }