MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / main

Function main

include/hx/HxcppMain.h:83–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81 extern int _hxcpp_argc;
82 extern char **_hxcpp_argv;
83 int main(int argc,char **argv)
84 {
85 _hxcpp_argc = argc;
86 _hxcpp_argv = argv;
87 #endif
88 HX_TOP_OF_STACK
89 hx::Boot();
90 try
91 {
92 __boot_all();
93 __hxcpp_main();
94 }
95 catch (Dynamic e)
96 {
97 auto customStack = e->__Field(HX_CSTRING("_hx_customStack"), HX_PROP_DYNAMIC).asString();
98 if (::hx::IsNotNull(customStack))
99 {
100 printf("%s\n", customStack.utf8_str());
101 }
102 else
103 {
104 __hx_dump_stack();
105 }
106
107#ifdef HX_WIN_MAIN
108 MessageBoxA(0, e == null() ? "null" : e->toString().__CStr(), "Error", 0);
109#else
110 printf("Error : %s\n", e == null() ? "null" : e->toString().__CStr());
111#endif
112 return -1;
113 }
114 return 0;
115 }
116 #if 0
117 }
118 }

Callers

nothing calls this directly

Calls 8

IsNotNullFunction · 0.85
__hx_dump_stackFunction · 0.85
asStringMethod · 0.80
utf8_strMethod · 0.80
nullClass · 0.50
__FieldMethod · 0.45
__CStrMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected