Disable all code related to libXp
[oweals/cde.git] / cde / programs / dtinfo / DtMmdb / dti_excs / init.C
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 // $XConsortium: init.cc /main/3 1996/06/11 16:51:58 cde-hal $
24
25 #ifndef NATIVE_EXCEPTIONS
26 #include "Exceptions.hh"
27
28 //#define G_TEMP_SPACE_SIZE 1024
29
30 void initialize_exception()
31 {
32
33 Exceptions::f_msg_internal_error =     (char*)"Internal exceptions error:";
34 Exceptions::f_msg_application_error =  (char*)"Application exceptions error:";
35 Exceptions::f_msg_throw_message =      (char*)"Application threw exception:";
36
37 Exceptions::f_msg_not_initialized =
38   (char*)"Exceptions library not initialized with INIT_EXCEPTIONS().";
39
40 Exceptions::f_msg_initialized_twice =
41   (char*)"Attept to call INIT_EXCEPTIONS() more than once.";
42   
43 Exceptions::f_msg_not_caught =
44   (char*)"Exception not caught.";
45
46 Exceptions::f_msg_no_current_exception =
47   (char*)"There is no current exception (for catch or rethrow).";
48
49 Exceptions::f_msg_throw_from_terminate =
50   (char*)"Exceptions may not be thrown from terminate.";
51
52 Exceptions::f_msg_throw_from_error_handler =
53   (char*)"Exceptions may not be thrown from error handler.";
54
55 Exceptions::f_msg_throw_from_destructor =
56   (char*)"Exited destructor with throw while handling an exception.";
57
58 Exceptions::f_msg_throw_ptr_to_stack =
59   (char*)"Threw a pointer to an automatic (stack-based) exceptions object.";
60
61 Exceptions::f_msg_out_of_exception_memory =
62   (char*)"Not enough memory to allocate an exception object.";
63
64 Exceptions::f_msg_out_of_obj_stack_memory =
65   (char*)"Not enough memory to allocate object stack.";
66
67 Exceptions::f_msg_memory_already_freed =
68   (char*)"Tried to alloc or realloc pool memory that was previously freed.";
69
70    Unwind_Stack::g_stack = new Unwind_Record[UNWIND_STACK_SIZE];
71    Exception::g_temp_space = new char[G_TEMP_SPACE_SIZE];
72    Exception::g_next_avail = Exception::g_temp_space;
73 }
74
75 void quit_exception()
76 {
77    delete Unwind_Stack::g_stack;
78 }
79
80 #endif