-
Notifications
You must be signed in to change notification settings - Fork 3
/
HPCError.h
75 lines (65 loc) · 1.75 KB
/
HPCError.h
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
64
65
66
67
68
69
70
71
72
73
74
75
#include <exception>
#include <iostream>
#include <string>
#include <stack>
#ifndef HPCPARALLELPATTERN_H
#include "HPCParallelPattern.h"
#endif
class PInTRuntimeException: public std::exception{
public:
virtual const char* what() const throw()=0;
};
class TooManyEndsException: public PInTRuntimeException{
public:
TooManyEndsException(){};
TooManyEndsException(std::string ID);
const char* what() const throw();
void resolveError();
private:
std::string ID = "ID";
};
class TooManyBeginsException: public PInTRuntimeException{
public:
TooManyBeginsException(){};
TooManyBeginsException(std::string ID);
const char* what() const throw();
void resolveError();
private:
std::string ID = "";
};
class PatternSpreadOverSatementsException: public PInTRuntimeException{
public:
const char* what() const throw();
void resolveError();
};
/*
* This exception should only be caught in main function
*/
class TerminateEarlyException: public PInTRuntimeException{
public:
const char* what() const throw();
};
class WrongNestingException: public PInTRuntimeException{
public:
WrongNestingException(std::string ID, std::string TopID);
const char* what() const throw();
private:
std::string ID;
std::string TopID;
};
class WrongSyntaxException: public PInTRuntimeException{
public:
WrongSyntaxException(PatternOccurrence* PatOc);
const char* what() const throw();
private:
std::string ID;
};
class missingPatternEnd: public PInTRuntimeException{
public:
missingPatternEnd(std::vector<PatternCodeRegion*> PatContext);
missingPatternEnd(){};
const char* what() const throw();
void printPatternWithNoEnd() const;
private:
std::vector<PatternCodeRegion*> PatternVector;
};