-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathError.cpp
63 lines (52 loc) · 1.95 KB
/
Error.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Error.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ckatz <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/07/16 12:31:27 by ckatz #+# #+# */
/* Updated: 2018/07/16 14:18:11 by ckatz ### ########.fr */
/* */
/* ************************************************************************** */
#include "Error.hpp"
const char* Error::UnknownInstructionException::what() const throw()
{
return ("Error, unknown instruction entered");
}
const char* Error::ParserException::what() const throw()
{
return ("Error, line can not be parsed");
}
const char* Error::InvalidOperandException::what() const throw()
{
return ("Error, unknown operand entered");
}
const char* Error::OverflowException::what() const throw()
{
return ("Error, overflow on value");
}
const char* Error::UnderflowException::what() const throw()
{
return ("Error, underflow on value");
}
const char* Error::EmtyStackException::what() const throw()
{
return ("Error, stack is empty");
}
const char* Error::DivisionModuloByZeroException::what() const throw()
{
return ("Error, division or modulo by 0");
}
const char* Error::NoExitException::what() const throw()
{
return ("Error, no exit found");
}
const char* Error::FalseAssertException::what() const throw()
{
return ("Error, assert is not true");
}
const char* Error::TooFewValuesException::what() const throw()
{
return ("Error, less than two values on stack");
}