Statistics
| Branch: | Revision:

root / src / sim / errmsg.cc @ e26d3d25

History | View | Annotate | Download (3.62 KB)

1 01873262 Georg Kunz
//=========================================================================
2
//  ERRMSG.CC - part of
3
//
4
//                  OMNeT++/OMNEST
5
//           Discrete System Simulation in C++
6
//
7
//  Author: Andras Varga
8
//
9
//=========================================================================
10
11
/*--------------------------------------------------------------*
12
  Copyright (C) 1992-2008 Andras Varga
13
  Copyright (C) 2006-2008 OpenSim Ltd.
14

15
  This file is distributed WITHOUT ANY WARRANTY. See the file
16
  `license' for details on this and other legal matters.
17
*--------------------------------------------------------------*/
18
19
20
#include "errmsg.h"
21
22
USING_NAMESPACE
23
24
25
const char *cErrorMessages::get(OppErrorCode e)
26
{
27
    switch (e)
28
    {
29
      case eOK:        return "No error -- everything's fine";
30
      case eBACKSCHED: return "Cannot schedule message (%s)%s to the past, t=%g";
31
      case eBADCAST:   return "Cannot cast from type %s to %s";
32
      case eBADEXP:    return "Badly formed Reverse Polish expression";
33
      case eBADINIT:   return "setValue(): Type %s does not suit arg types";
34
      case eCANCEL:    return "Simulation cancelled";
35
      case eCANTCOPY:  return "Assignment, copying, dup() not supported by this class";
36
      case eCANTDUP:   return "This object cannot dup() itself";
37
      case eCANTPACK:  return "parsimPack()/parsimUnpack() not supported for this object";
38
      case eCUSTOM:    return "%s";
39
      case eDIMLESS:   return "Error in expression: `%s': argument(s) must be dimensionless";
40
      case eEBADARGS:  return "Error in expression: `%s': wrong argument type(s)";
41
      case eECANTCAST: return "Cannot cast result of expression to %s";
42
      case eENDEDOK:   return "No more events -- simulation ended";
43
      case eENDSIM:    return "Simulation stopped with endSimulation()";
44
      case eENOPARENT: return "Expression cannot be interpreted on network level";
45
      case eESTKOFLOW: return "Expression stack overflow";
46
      case eESTKUFLOW: return "Expression stack underflow";
47
      case eFINISH:    return "All finish() functions called, simulation ended";
48
      case eGATEID:    return "Invalid gate Id %d";
49
      case eINFLOOP:   return "FSM: infinite loop of transient states (now in state %s)";
50
      case eLOCKED:    return "Object is locked against modifications, try unlockProperties() on parent object";
51
      case eMODFIN:    return "Message sent to already terminated module `%s'";
52
      case eMODINI:    return "Module initialization error";
53
      case eNEGTIME:   return "wait(): negative delay";
54
      case eNEGTOUT:   return "receive()/receiveNew(): negative timeout";
55
      case eNONET:     return "Network definition not found";
56
      case eNOPARSIM:  return "Simulation kernel was compiled without parallel simulation support (WITH_PARSIM=no)";
57
      case eNORECV:    return "Cannot use receive..() or wait() with handleMessage()";
58
      case eNUMARGS:   return "Bad number of arguments, %d expected";
59
      case ePARAM:     return "Error evaluating parameter `%s': %s";
60
      case ePARAMSNOTREADY: return "Attempt to access component parameters too early, they have not been set up yet";
61
      case eREALTIME:  return "CPU time limit reached -- simulation stopped";
62
      case eSIMTIME:   return "Simulation time limit reached -- simulation stopped";
63
      case eSTATECHG:  return "FSM: state changed during state entry code (now in state %s)";
64
      case eSTOPSIMRCVD: return "Simulation stopped by partition %d: %s";
65
      case eUSER:      return "Model error: %s";
66
      case eWRONGSIM:  return "cSimulation instance not activated before invoked (need setActiveSimulation())";
67
      default:         return "<missing error text>";
68
    }
69
}