rustws/
error.rs

1#[allow(non_camel_case_types)]
2#[derive(Debug)]
3/// The kind of exceptions the program can throw
4pub enum Error {
5	/// Error thrown when current Program Conter reached a position outside the program
6	/// This can also be thrown if the did not receive an Exit command before the last statement
7	PC_OUT_OF_BOUNDS,
8	/// Error thrown when an undefined statement was read
9	/// Syntax Error for short
10	UNIMPLEMENTED_INSTRUCTION, 
11	/// Error thrown when trying to access data from an empty stack
12	EMPTY_STACK,
13	/// Error thrown when return called without calling a function beforehand
14	EMPTY_FLOW_STACK,
15	/// Error thrown when trying to divide by zero
16	DIVISION_BY_ZERO,
17	/// Error thrown when trying to access an undefined address from the heap
18	UNDEFINED_HEAP_ADDRESS,
19	/// Error thrown when trying to jump/call a label that was not defined
20	UNDEFINED_LABEL,
21}