OpenASIP  2.0
Public Member Functions | Private Attributes | List of all members
CompileError Class Reference

#include <Exception.hh>

Inheritance diagram for CompileError:
Inheritance graph
Collaboration diagram for CompileError:
Collaboration graph

Public Member Functions

 CompileError (std::string filename, int linenum, std::string procname=unknownProcMsg_, std::string errorMessage="")
 
virtual ~CompileError ()
 
void setCodeFileLineNumber (int lineNum)
 
int codeFileLineNumber ()
 
- Public Member Functions inherited from Exception
 Exception (std::string filename, int linenum, std::string procname=unknownProcMsg_, std::string errorMessage="")
 
virtual ~Exception ()
 
std::string fileName () const
 
int lineNum () const
 
std::string procedureName () const
 
std::string errorMessage () const
 
std::string errorMessageStack (bool messagesOnly=false) const
 
void setCause (const Exception &cause)
 
bool hasCause () const
 
const Exceptioncause () const
 

Private Attributes

int codeLineNumber_
 

Additional Inherited Members

- Static Public Member Functions inherited from Exception
static std::string lastExceptionInfo ()
 Returns information of the last thrown exception. More...
 
- Static Public Attributes inherited from Exception
static const std::string unknownProcMsg_ = "(unknown)"
 Used when no procedure name is given. More...
 

Detailed Description

Exception which is thrown when there is error in compilation.

Definition at line 1019 of file Exception.hh.

Constructor & Destructor Documentation

◆ CompileError()

CompileError::CompileError ( std::string  filename,
int  linenum,
std::string  procname = unknownProcMsg_,
std::string  errorMessage = "" 
)

Constructor.

Parameters
filenameName of the file in which the exception is created.
linenumNumber of the line in which the exception is created.
procnameName of the function in which the exception is created.
errorMessageError message.

Definition at line 1458 of file Exception.cc.

1462  :
1463  Exception(filename, linenum, procname, errorMessage) {
1464 }

◆ ~CompileError()

CompileError::~CompileError ( )
virtual

Destructor.

Definition at line 1470 of file Exception.cc.

1470  {
1471 }

Member Function Documentation

◆ codeFileLineNumber()

int CompileError::codeFileLineNumber ( )

Returns line number where error happened in source code file that is compiled.

Returns
Line number where error happened in source code file that is compiled.

Definition at line 1489 of file Exception.cc.

1489  {
1490  return codeLineNumber_;
1491 }

References codeLineNumber_.

Referenced by Assembler::compile().

◆ setCodeFileLineNumber()

void CompileError::setCodeFileLineNumber ( int  lineNum)

Set's line number where error happened in source code that is compiled.

Parameters
lineNumLine number where error happened in code that is compiled.

Definition at line 1479 of file Exception.cc.

1479  {
1481 }

References codeLineNumber_, and Exception::lineNum().

Referenced by CodeSectionCreator::addMove(), DataSectionCreator::finalize(), DataSectionCreator::resolveDataAreaSizesAndLabelAddresses(), LabelManager::resolveExpressionValue(), and DataSectionCreator::writeDataLineToTPEF().

Here is the call graph for this function:

Member Data Documentation

◆ codeLineNumber_

int CompileError::codeLineNumber_
private

Definition at line 1033 of file Exception.hh.

Referenced by codeFileLineNumber(), and setCodeFileLineNumber().


The documentation for this class was generated from the following files:
Exception::lineNum
int lineNum() const
CompileError::codeLineNumber_
int codeLineNumber_
Definition: Exception.hh:1033
Exception::errorMessage
std::string errorMessage() const
Definition: Exception.cc:123
Exception::Exception
Exception(std::string filename, int linenum, std::string procname=unknownProcMsg_, std::string errorMessage="")
Definition: Exception.cc:57