source: trunk/yat/utility/Exception.h @ 718

Last change on this file since 718 was 718, checked in by Jari Häkkinen, 16 years ago

Addresses #170.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.4 KB
Line 
1#ifndef _theplu_yat_utility_exception_
2#define _theplu_yat_utility_exception_
3
4// $Id: Exception.h 718 2006-12-26 09:56:26Z jari $
5
6/*
7  Copyright (C) 2005 Jari Häkkinen, Peter Johansson
8  Copyright (C) 2006 Jari Häkkinen
9
10  This file is part of the yat library, http://lev.thep.lu.se/trac/yat
11
12  The yat library is free software; you can redistribute it and/or
13  modify it under the terms of the GNU General Public License as
14  published by the Free Software Foundation; either version 2 of the
15  License, or (at your option) any later version.
16
17  The yat library is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20  General Public License for more details.
21
22  You should have received a copy of the GNU General Public License
23  along with this program; if not, write to the Free Software
24  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25  02111-1307, USA.
26*/
27
28#include <stdexcept>
29#include <string>
30
31namespace theplu {
32namespace yat {
33namespace utility {
34
35  ///
36  /// @brief Class for IO errors
37  ///
38  class IO_error : public std::runtime_error
39  {
40  public:
41    ///
42    /// Default constructor
43    ///
44    inline IO_error(void) throw() : std::runtime_error("IO_error:") {}
45
46    ///
47    /// Constructor for exception with message
48    ///
49    inline IO_error(std::string message) throw()
50      : std::runtime_error("IO_error: " + message) {}
51  };
52
53}}} // of namespace utility, yat, and theplu
54
55#endif
Note: See TracBrowser for help on using the repository browser.