00001 /* 00002 * lib/serror_g.cc 00003 * 00004 * Standard / System error representation class: Implementation of 00005 * glib-dependent routines. 00006 * 00007 * Copyright (c) 2004 by Wolfgang Wieser ] wwieser (a) gmx <*> de [ 00008 * 00009 * This file may be distributed and/or modified under the terms of the 00010 * GNU General Public License version 2 as published by the Free Software 00011 * Foundation. (See COPYING.GPL for details.) 00012 * 00013 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00014 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00015 * 00016 */ 00017 00018 #include "serror.h" 00019 00020 00021 void SError::_assign(GError *&g) 00022 { 00023 if(!g) 00024 { ecode=0; edomain=-1; errmsg=NULL; } 00025 else 00026 { 00027 ecode=g->code; 00028 edomain=0; 00029 errmsg=g->message; 00030 00031 g_error_free(g); 00032 g=NULL; 00033 } 00034 }