File: Error.h

package info (click to toggle)
basic256 2.0.0.11-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 15,076 kB
  • sloc: cpp: 16,791; yacc: 3,979; lex: 1,446; makefile: 25
file content (63 lines) | stat: -rwxr-xr-x 1,114 bytes parent folder | download
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
#pragma once

#include <string.h>
#include <stdio.h>
#include <stdlib.h>

#include "ErrorCodes.h"
#include "Settings.h"

#include <QCoreApplication>
#include <QString>

class Error
{
	Q_DECLARE_TR_FUNCTIONS(Error)
	
	public:

		// current 
		int e;					// error
		int var;				// variable number
		int x;					// array row
		int y;					// array column
		QString extra;			// extra text
		int line;				// line number
		
		//pending
		int pending_e;
		int pending_var;
		int pending_x;
		int pending_y;
		QString pending_extra;
		
		void loadSettings();
		  
		Error();
		
		bool pending();

		void process(int);
		
		void q(int);
		void q(int, int);			// with variable
		void q(int, int, int, int);	// with array variable and dimensions
		void q(int, QString);		// with extra text
		
		void deq();

		bool isFatal();
		bool isFatal(int);

		QString getErrorMessage(char **);
		QString getErrorMessage(int, int, char**);
 		
 	private:
 		int typeconverror;
 		int varnotassignederror;
 		
 		void q(int, int, int, int, QString);

};

extern Error *error;