From a812da5e5c866b6fbd27b57bbccf9f8a42d40318 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sat, 10 Sep 2005 20:10:38 +0000 Subject: Committed patch by Nayr for displaying a messagebox when an error occurs on MacOS. --- src/log.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/log.cpp b/src/log.cpp index f24461cb..65519cba 100644 --- a/src/log.cpp +++ b/src/log.cpp @@ -23,6 +23,9 @@ #ifdef WIN32 #include #endif +#ifdef __APPLE__ +#include +#endif #include #include @@ -90,6 +93,11 @@ void Logger::error(const std::string &error_text) log("Error: %s", error_text.c_str()); #ifdef WIN32 MessageBox(NULL, error_text.c_str(), "Error", MB_ICONERROR | MB_OK); +#elif defined __APPLE__ + Str255 msg; + c2pstrcpy(msg, error_text.c_str()); + StandardAlert(kAlertStopAlert, "\pError", + (ConstStr255Param)msg, NULL, NULL); #else std::cerr << "Error: " << error_text << std::endl; #endif -- cgit v1.2.3-70-g09d2