/[escript]/trunk/esysUtils/src/EsysAssertException.cpp
ViewVC logotype

Contents of /trunk/esysUtils/src/EsysAssertException.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1455 - (show annotations)
Thu Feb 28 17:19:44 2008 UTC (11 years, 5 months ago) by phornby
File size: 1425 byte(s)
Merge of branches/windows_from_1431_trunk.

Revamp of the exception system.
Fix unused vars and signed/unsigned comparisons.
defined a macro THROW(ARG) in the system_dep.h's to
deal with the expectations of declarations on different architectures.

Details in the logs of branches/windows_from_1431_trunk.

pre-merge snapshot of the trunk in tags/trunk_at_1452


1
2 /* $Id: EsysAssertException.cpp 1312 2007-09-24 06:18:44Z ksteube $ */
3
4 /*******************************************************
5 *
6 * Copyright 2003-2007 by ACceSS MNRF
7 * Copyright 2007 by University of Queensland
8 *
9 * http://esscc.uq.edu.au
10 * Primary Business: Queensland, Australia
11 * Licensed under the Open Software License version 3.0
12 * http://www.opensource.org/licenses/osl-3.0.php
13 *
14 *******************************************************/
15
16 #include "EsysAssertException.h"
17 #include <sstream>
18
19
20 using namespace esysUtils;
21
22 const std::string
23 EsysAssertException::exceptionNameValue("EsysAssertException");
24
25
26 const std::string &
27 EsysAssertException::exceptionName() const
28 {
29 return exceptionNameValue;
30 }
31
32
33
34 static void assertFailure (const std::string& assertion,
35 const std::string& date, const std::string& file,
36 int line, const std::string& errDesc)
37 {
38 std::stringstream message;
39
40 message << std::endl
41 << "EsysAssert(" << assertion << ") failed with message - "
42 << std::endl
43 << "\"" << errDesc << "\"" << std::endl
44 << "Assertion is located in File : " << file
45 << " at Line: " << line << std::endl
46 << "File Compilation Date: " << date << std::endl;
47
48 throw EsysAssertException(message.str());
49 }

  ViewVC Help
Powered by ViewVC 1.1.26