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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1796 - (show annotations)
Wed Sep 17 01:45:46 2008 UTC (12 years, 7 months ago) by jfenwick
File size: 1441 byte(s)
Merged noarrayview branch onto trunk.


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 void
35 EsysAssertException::assertFailure (const std::string& assertion,
36 const std::string& date, const std::string& file,
37 int line, const std::string& errDesc)
38 {
39 std::stringstream message;
40
41 message << std::endl
42 << "EsysAssert(" << assertion << ") failed with message - "
43 << std::endl
44 << "\"" << errDesc << "\"" << std::endl
45 << "Assertion is located in File : " << file
46 << " at Line: " << line << std::endl
47 << "File Compilation Date: " << date << std::endl;
48
49 throw EsysAssertException(message.str());
50 }

  ViewVC Help
Powered by ViewVC 1.1.26