OSDN Git Service

Add a missing return statement.
[mingw/wtklite.git] / wtkexcept.cpp
1 /*
2  * wtkexcept.cpp
3  *
4  * ---------------------------------------------------------------------------
5  *
6  * Implementation of a minimal C++ class framework for use with the
7  * Microsoft Windows Application Programming Interface.
8  *
9  * $Id$
10  *
11  * This file provides the implementation for the WTK::runtime_error class,
12  * a derivative of std::exception similar to std::runtime_error, but using
13  * a "const char *" argument in preference to a std::string, to classify
14  * the exception.
15  *
16  * Written by Keith Marshall <keithmarshall@users.sourceforge.net>
17  * Copyright (C) 2012, MinGW.org Project.
18  *
19  * Based on the implementation of mingw-get's dmh_exception class
20  * Originally written by Charles Wilson <cwilso11@users.sourceforge.net>
21  *
22  * ---------------------------------------------------------------------------
23  *
24  * Permission is hereby granted, free of charge, to any person obtaining a
25  * copy of this software and associated documentation files (the "Software"),
26  * to deal in the Software without restriction, including without limitation
27  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
28  * and/or sell copies of the Software, and to permit persons to whom the
29  * Software is furnished to do so, subject to the following conditions:
30  *
31  * The above copyright notice, this permission notice, and the following
32  * disclaimer shall be included in all copies or substantial portions of
33  * the Software.
34  *
35  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
36  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
37  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
38  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
39  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
40  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
41  * DEALINGS IN THE SOFTWARE.
42  *
43  * ---------------------------------------------------------------------------
44  *
45  */
46 #include "wtkexcept.h"
47
48 namespace WTK
49 {
50   static const char *unspecified = "Unspecified exception";
51
52   runtime_error::runtime_error() throw(): message( unspecified ){}
53
54   runtime_error::runtime_error( const char *msg ) throw(): message( unspecified )
55   { if( msg && *msg ) message = msg; }
56
57   const char *runtime_error::what() const throw(){ return message; }
58 }
59
60 /* $RCSfile$: end of file */