Project

General

Profile

Statistics
| Branch: | Revision:

root / src / scave / scaveexception.cc @ 81ad8b66

History | View | Annotate | Download (1.04 KB)

1
//=========================================================================
2
//  SCAVEEXCEPTION.CC - part of
3
//                  OMNeT++/OMNEST
4
//           Discrete System Simulation in C++
5
//
6
//  Author: Tamas Borbely
7
//
8
//=========================================================================
9

    
10
/*--------------------------------------------------------------*
11
  Copyright (C) 2006-2008 OpenSim Ltd.
12

13
  This file is distributed WITHOUT ANY WARRANTY. See the file
14
  `license' for details on this and other legal matters.
15
*--------------------------------------------------------------*/
16

    
17
#include <sstream>
18
#include "scaveexception.h"
19

    
20
USING_NAMESPACE
21

    
22

    
23
ResultFileFormatException::ResultFileFormatException(const char *message, const char *file, int64 line, file_offset_t offset)
24
    : opp_runtime_error(""), file(file), line(line), offset(offset)
25
{
26
    std::ostringstream msg;
27
    msg << message << ", file " << file;
28
    if (line >= 0)
29
        msg << ", line " << line;
30
    if (offset >= 0)
31
        msg << ", offset " << offset;
32

    
33
    errormsg = msg.str();
34
}