#include "magic/mobject.h"
Go to the source code of this file.
Namespaces | |
namespace | MagiC |
Compounds | |
class | Exception |
Highest exception class. More... | |
Defines | |
#define | EXCEPTIONCLASS(eclass) |
#define | failtrace_begin try { |
#define | failtrace(expr) failtrace_begin; expr; failtrace_end; |
#define | trywith(expr, err) |
Enumerations | |
enum | assertmodes |
Functions | |
BEGIN_NAMESPACE (MagiC) | |
EXCEPTIONCLASS (generic_exception) | |
EXCEPTIONCLASS (invalid_format) | |
EXCEPTIONCLASS (forwarded_failure) | |
EXCEPTIONCLASS (system_failure) | |
EXCEPTIONCLASS (open_failure) | |
EXCEPTIONCLASS (device_not_open) | |
EXCEPTIONCLASS (check_failed) | |
EXCEPTIONCLASS (must_overload) | |
void | assertwith (const char *filename, int lineno, const char *funcname, const char *condition=NULL, const char *message=NULL) |
Definition in file mexception.h.
|
Value: class eclass : public Exception {\ public:\ eclass (const String& what_arg) : Exception (what_arg) { }\ virtual ~eclass () {;}\ };
Definition at line 81 of file mexception.h. |
|
If the expr throws an exception, this macro rethrows it, but records the filename and line number in the Exception reason.
Definition at line 139 of file mexception.h. |
|
Failtrace and trywith.
Definition at line 126 of file mexception.h. |
|
Value: } catch (Exception e) { \ throw forwarded_failure (format ("%s\n%%ERR: Exception forwaded at %s[%d]:%s()", \ (CONSTR) e.what(), __FILE__, __LINE__, __FUNCTION__)); \ } Definition at line 127 of file mexception.h. |
|
Value: try { \ expr; \ } catch (Exception e) { \ throw forwarded_failure (format ("%s\n%%ERR: Exception forwaded at %s[%d]:%s()\n%%ERR: %s", \ (CONSTR) e.what(), __FILE__, __LINE__, __FUNCTION__, (CONSTR) err)); \ } If the expr throws an exception, this macro rethrows it, but records the filename and line number in the Exception reason, as well as additional explanation. Definition at line 147 of file mexception.h. |
|
The Application and ASSERT framework supports many ways of handling assertion fails. It is, for example, very useful to crash the program (ASSERT_CRASH) if you are running the program under debugger. Just include in your Main line: assertmode = ASSERT_CRASH; Definition at line 166 of file mexception.h. |
|
Internal for ASSERT and ASSERTWITH. * Definition at line 447 of file mobject.cc. |
|
This file is part of the MagiC++ library. * * Copyright (C) 1998-2002 Marko Grönroos <magi@iki.fi> * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library 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 * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; see the file COPYING.LIB. If * not, write to the Free Software Foundation, Inc., 59 Temple Place *
|
|
Special exceptions for unimplemented member functions.
|
|
Intergrity check operation for an object failed.
|
|
An operation was attempted on a closed device.
|
|
Opening a file or device failed for some reason.
|
|
A failure in an I/O or other system call.
|
|
A file was not found.
|
|
Flag parameters given in a call were invalid.
|
|
Common exceptions.
|