summaryrefslogtreecommitdiffhomepage
path: root/dev/LibC++/base_exception.h
blob: 9d9dcc99a76654ca6a121d338cdef4d7f0c2d867 (plain)
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
/* -------------------------------------------

	Copyright ZKA Web Services Co.

------------------------------------------- */

#pragma once

#include <LibC++/defines.h>
#include <LibC++/exit.h>

namespace std
{
	inline void __throw_general(void)
	{
		exit(33);
	}

	inline void __throw_domain_error(const char* error)
	{
		__throw_general();
		__builtin_unreachable(); // prevent from continuing.
	}

	inline void __throw_bad_array_new_length(void)
	{
		__throw_general();
		__builtin_unreachable(); // prevent from continuing.
	}
} // namespace std