summaryrefslogtreecommitdiffhomepage
path: root/dev/LibC++/base_exception.h
blob: 314ac1276db0cc8d6a96eb4b0aef159b49fee351 (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
/* -------------------------------------------

  Copyright (C) 2024-2025 Amlal El Mahrouss, 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