ReactOS 0.4.15-dev-7674-gc0b4db1
rethrow_unknown.cpp File Reference
#include <stdio.h>
Include dependency graph for rethrow_unknown.cpp:

Go to the source code of this file.

Typedefs

typedef void(* OperationF) ()
 

Functions

void TestFunction ()
 
void RethrowIt ()
 
int HandleRethrown1 (OperationF perform)
 
int HandleRethrown2 (OperationF perform)
 
int main ()
 

Typedef Documentation

◆ OperationF

typedef void(* OperationF) ()

Definition at line 7 of file rethrow_unknown.cpp.

Function Documentation

◆ HandleRethrown1()

int HandleRethrown1 ( OperationF  perform)

Definition at line 11 of file rethrow_unknown.cpp.

11 {
12 int ret = 0;
13 try {
14 perform();
15 return 0;
16 } catch (...) {
17 // ellipsis catch
18 try {
19 RethrowIt();
20 } catch (...) {
21 ret = 1;
22 }
23 }
24
25 return ret;
26}
void RethrowIt()
int ret

Referenced by main().

◆ HandleRethrown2()

int HandleRethrown2 ( OperationF  perform)

Definition at line 28 of file rethrow_unknown.cpp.

28 {
29 int ret = 0;
30 try {
31 perform();
32 return 0;
33 } catch (int j) {
34 // non-ellipsis catch
35 try {
36 RethrowIt();
37 } catch (int i) {
38 ret = i;
39 }
40 }
41
42 return ret;
43}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250

Referenced by main().

◆ main()

int main ( void  )

Definition at line 45 of file rethrow_unknown.cpp.

45 {
46 int exit_code1;
47 int exit_code2;
48 exit_code1 = HandleRethrown1(TestFunction);
49 exit_code2 = HandleRethrown2(TestFunction);
50
51 if (exit_code1 == 1 && exit_code2 == 1) {
52 printf("passed");
53 } else {
54 printf("failed");
55 }
56
57 return 0;
58}
#define printf
Definition: freeldr.h:94
int HandleRethrown1(OperationF perform)
void TestFunction()
int HandleRethrown2(OperationF perform)

◆ RethrowIt()

void RethrowIt ( )

Definition at line 9 of file rethrow_unknown.cpp.

9{ throw; }

Referenced by HandleRethrown1(), and HandleRethrown2().

◆ TestFunction()

void TestFunction ( )

Definition at line 8 of file rethrow_unknown.cpp.

8{ throw 1; }

Referenced by main(), RunTest(), and TestDefaultFormat().