// =========================================================================== // BasicMain.cp PPx Stationery ©2003 Metrowerks Corp. // =========================================================================== #include #if PPx_Debug #include // Custom data viewers for source debugger #endif // --------------------------------------------------------------------------- // Function Prototypes void BeginProgram(); void RunProgram(); void EndProgram(); // --------------------------------------------------------------------------- int main() { #if PPx_Debug DataViewLibInit(); // View opaque types in source debugger #endif PPx_SetDebugThrow_Alert_(); // Set PPx debugging options PPx_SetDebugSignal_Alert_(); try { BeginProgram(); RunProgram(); EndProgram(); } // A well-behaved program should not let an exception // propagate up to main. But, mistakes happen, so we // catch everything and display debugging information. catch (const PPx::Exception& inException) { #if PPx_Debug_Exceptions PPx::Debugging::ExceptionAlert(inException); #endif } catch (...) { #if PPx_Debug_Signals PPx::Debugging::SignalAlert("Exception caught in main", PPx_SignalLoc_Here); #endif } }