opennurbs_error_message.cpp
Go to the documentation of this file.
00001 /* $NoKeywords: $ */
00002 /*
00003 //
00004 // Copyright (c) 1993-2012 Robert McNeel & Associates. All rights reserved.
00005 // OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert
00006 // McNeel & Associates.
00007 //
00008 // THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
00009 // ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF
00010 // MERCHANTABILITY ARE HEREBY DISCLAIMED.
00011 //                              
00012 // For complete openNURBS copyright information see <http://www.opennurbs.org>.
00013 //
00015 */
00016 
00017 #include "pcl/surface/3rdparty/opennurbs/opennurbs.h"
00018 
00019 
00020 void ON_ErrorMessage(
00021         int message_type, // 0=warning - serious problem that code is designed to handle
00022                           // 1=error - serious problem code will attempt to handle
00023                           //           The thing causing the error is a bug that must
00024                           //           be fixed.
00025                           // 2=assert failed - crash is nearly certain
00026         const char* sErrorMessage 
00027         )
00028 {
00029   // error/warning/assert message is in sMessage[] buffer.  Modify this function
00030   // to do whatever you want to with the message.
00031   if ( sErrorMessage && sErrorMessage[0] ) 
00032   {
00033 
00034 #if defined(ON_PURIFY_BUILD) && defined(ON_32BIT_POINTER)
00035     // 10 December 2003 Dale Lear
00036     //     Make ON_ERROR/ON_WARNING messages show up in Purify
00037     PurifyPrintf("%s",sErrorMessage);
00038 #endif
00039 
00040 #if defined(ON_OS_WINDOWS)
00041     ::OutputDebugStringA( "\n" );
00042     ::OutputDebugStringA( sErrorMessage );
00043     ::OutputDebugStringA( "\n" );
00044 #else
00045 #if defined(ON__DEBUG)
00046     // not using OutputDebugStringA
00047     printf("\n%s\n",sErrorMessage);
00048 #endif
00049 #endif
00050   }
00051 }


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:27:00