source: trunk/legacy/exception.hh @ 533

Last change on this file since 533 was 440, checked in by epyon, 10 years ago
  • massive std::string removal
  • no header depends on std::string anymore (or any other STL header)
  • still some code files do (WIP)
  • massive refactoring where std::string was used
  • lua still messy (grep for string128 - used everywhere)
  • string_twine added
File size: 961 bytes
Line 
1// Copyright (C) 2012-2015 ChaosForge Ltd
2// http://chaosforge.org/
3//
4// This file is part of Nova libraries.
5// For conditions of distribution and use, see copying.txt file in root folder.
6
7/**
8 * @file exception.hh
9 * @author Kornel Kisielewicz epyon@chaosforge.org
10 * @brief nv exception bases
11 */
12
13#ifndef NV_STL_EXCEPTION_HH
14#define NV_STL_EXCEPTION_HH
15
16#include <nv/common.hh>
17#include <string>
18#include <exception>
19#include <stdexcept>
20
21namespace nv
22{
23        /**
24         * NV logic_error.
25         *
26         * Inherits std::logic_error.
27         */
28        class logic_error : public std::logic_error
29        {
30        public:
31                explicit logic_error( const std::string& msg ) : std::logic_error( msg ) {}
32        };
33
34        /**
35         * NV runtime_error.
36         *
37         * Inherits std::runtime_error.
38         */
39        class runtime_error : public std::runtime_error
40        {
41        public:
42                explicit runtime_error( const std::string& msg ) : std::runtime_error( msg ) {}
43        };
44}
45
46#endif // NV_STL_EXCEPTION_HH
Note: See TracBrowser for help on using the repository browser.