topazc
exception.hpp File Reference

Header file for defining thrown exceptions by the compiler. More...

#include <cstdint>
#include <string>
Include dependency graph for exception.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  SubsystemType { SUB_LEXER , SUB_PARSER , SUB_SEMANTIC , SUB_CODEGEN }
 Subsystem from which the exception throwed. More...

Functions

void throw_exception (SubsystemType type, std::string msg, uint32_t line, std::string file_name, bool is_debug)
 Function for throwing exception.

Detailed Description

Header file for defining thrown exceptions by the compiler.

Definition in file exception.hpp.

Enumeration Type Documentation

◆ SubsystemType

Subsystem from which the exception throwed.

Enumerator
SUB_LEXER 

Lexer subsystem

SUB_PARSER 

Parser subsystem

SUB_SEMANTIC 

Semantic subsystem

SUB_CODEGEN 

Code generator subsystem

Definition at line 14 of file exception.hpp.

Function Documentation

◆ throw_exception()

void throw_exception ( SubsystemType type,
std::string msg,
uint32_t line,
std::string file_name,
bool is_debug )

Function for throwing exception.

This function throwing exception based passed arguments

Parameters
typeSubsystem from which the exception throwned
msgException message
lineLine where exception throwed
file_nameFile where exception throwed
is_debugFlag for print debug information

Definition at line 30 of file exception.cpp.

Here is the call graph for this function: