-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathEgg.cpp
More file actions
31 lines (26 loc) · 765 Bytes
/
Egg.cpp
File metadata and controls
31 lines (26 loc) · 765 Bytes
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
#include "Egg.h"
#include "Allocator/Memory.h"
#include "Evaluator/Runtime.h"
#include "Evaluator/Evaluator.h"
#include "Evaluator/EvaluationContext.h"
#include <iostream>
#include <cstdlib>
void Egg::error(const char *message) {
if (debugRuntime)
std::cerr << debugRuntime->_evaluator->context()->backtrace() << std::endl << std::endl;
std::cerr << "Error: " << message << std::endl;
std::exit(EXIT_FAILURE); // or std::abort();
}
void Egg::error_(const std::string &message) {
error(message.c_str());
}
void Egg::warning(const char *message) {
std::cerr << "WARNING: " << message << std::endl;
}
void Egg::warning_(const std::string &message) {
warning(message.c_str());
}
void Egg::Initialize()
{
InitializeMemory();
}