rl_raylib  1.1.10
rl_Exception.cc
1 // --8<--8<--8<--8<--
2 //
3 // Copyright (C) 2007 Smithsonian Astrophysical Observatory
4 //
5 // This file is part of rl_raylib
6 //
7 // rl_raylib is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License
9 // as published by the Free Software Foundation; either version 2
10 // of the License, or (at your option) any later version.
11 //
12 // rl_raylib is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the
19 // Free Software Foundation, Inc.
20 // 51 Franklin Street, Fifth Floor
21 // Boston, MA 02110-1301, USA
22 //
23 // -->8-->8-->8-->8--
24 
25 #include <rl_raylib/rl_Exception.h>
26 
28 
29 rl_Exception::rl_Exception( const std::string& msg )
30  : Exception( msg ) {}
31 
32 rl_Exception::rl_Exception( const char* format, ... )
33  : Exception()
34 {
35  va_list args;
36  va_start( args, format );
37  char str[ 8192 ];
38  vsprintf( str, format, args );
39  std::string msg = str;
40  set_message( msg );
41  va_end( args );
42 
43 }
44 
rl_Exception(const std::string &msg)
Include a string describing the exception.
Definition: rl_Exception.cc:29
~rl_Exception()
Destructor.
Definition: rl_Exception.cc:27