Move base exception in a separate header

Signed-off-by: Luca Bigliardi <shammash@artha.org>
This commit is contained in:
Luca Bigliardi
2009-08-29 01:29:35 +01:00
parent b262e8066f
commit 1972db3c69
4 changed files with 35 additions and 11 deletions
+1 -1
View File
@@ -16,6 +16,6 @@ noinst_HEADERS = asm-linkage.h audio_collector.h audio_input.h audio_jack.h \
shouter.h soft_screen.h text_layer.h theora11_encoder.h theorautils.h \
trigger_ctrl.h tvfreq.h unicap_layer.h v4l_layer.h video_encoder.h \
video_layer.h vimo_ctrl.h vroot.h wiimote_ctrl.h xgrab_layer.h xscreensaver_layer.h \
yuv_screeen.h opencv_cam_layer.h
yuv_screeen.h opencv_cam_layer.h exceptions.h
EXTRA_DIST = jsfreej.msg
+1
View File
@@ -25,6 +25,7 @@
#include <queue>
#include <jutils.h>
#include <exceptions.h>
class Closure;
+33
View File
@@ -0,0 +1,33 @@
/*
* Copyright (C) 2009 - Luca Bigliardi
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __FREEJ_EXCEPTIONS_H__
#define __FREEJ_EXCEPTIONS_H__
#include <stdexcept>
class FreejError : public std::runtime_error {
public:
FreejError(const std::string& msg = "", int rv = 0)
: std::runtime_error(msg), rv(rv) { }
int retval() { return rv; }
private:
int rv;
};
#endif
-10
View File
@@ -22,16 +22,6 @@
#include <stdlib.h>
#include <inttypes.h>
#include <errno.h>
#include <stdexcept>
class FreejError : public std::runtime_error {
public:
FreejError(const std::string& msg = "", int rv = 0)
: std::runtime_error(msg), rv(rv) { }
int retval() { return rv; }
private:
int rv;
};
class ConsoleController;