summaryrefslogtreecommitdiffhomepage
path: root/dev/LibC++/base_exception.h
blob: a8d7080e4620bbbc0dd68b284b9a482af1cd2670 (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 (C) 2024, EL Mahrouss Logic, all rights reserved.

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

#pragma once

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

namespace std::base_exception
{
	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::base_exception