lemon/error.h
author athos
Mon, 13 Jun 2005 16:10:36 +0000
changeset 1475 21aa0195aab9
parent 1399 d3ae1f06843d
child 1536 308150155bb5
permissions -rw-r--r--
Cplex test disabled again.
alpar@906
     1
/* -*- C++ -*-
ladanyi@1435
     2
 * lemon/error.h - Part of LEMON, a generic C++ optimization library
alpar@906
     3
 *
alpar@1164
     4
 * Copyright (C) 2005 Egervary Jeno Kombinatorikus Optimalizalasi
alpar@1359
     5
 * Kutatocsoport (Egervary Research Group on Combinatorial Optimization,
klao@1157
     6
 * EGRES).
alpar@906
     7
 *
alpar@906
     8
 * Permission to use, modify and distribute this software is granted
alpar@906
     9
 * provided that this copyright notice appears in all copies. For
alpar@906
    10
 * precise terms see the accompanying LICENSE file.
alpar@906
    11
 *
alpar@906
    12
 * This software is provided "AS IS" with no warranty of any kind,
alpar@906
    13
 * express or implied, and with no claim as to its suitability for any
alpar@906
    14
 * purpose.
alpar@906
    15
 *
alpar@906
    16
 */
alpar@883
    17
alpar@921
    18
#ifndef LEMON_ERROR_H
alpar@921
    19
#define LEMON_ERROR_H
alpar@883
    20
alpar@1151
    21
//! \ingroup exceptions
alpar@883
    22
//! \file
klao@1067
    23
//! \brief Basic exception classes and error handling.
alpar@883
    24
alpar@883
    25
#include <exception>
alpar@883
    26
#include <string>
alpar@883
    27
#include <sstream>
klao@1067
    28
#include <iostream>
klao@1067
    29
#include <cstdlib>
klao@1157
    30
#include <memory>
alpar@883
    31
alpar@921
    32
namespace lemon {
alpar@883
    33
deba@1207
    34
  /// \addtogroup exceptions
deba@1207
    35
  /// @{
deba@1207
    36
  
deba@1207
    37
  /// \brief Exception safe wrapper class.
deba@1207
    38
  ///
deba@1207
    39
  /// Exception safe wrapper class to implement the members of exceptions.
deba@1207
    40
  template <typename _Type>
deba@1207
    41
  class ExceptionMember {
deba@1207
    42
  public:
deba@1207
    43
    typedef _Type Type;
deba@1207
    44
deba@1207
    45
    ExceptionMember() throw () {
deba@1207
    46
      try {
deba@1207
    47
	ptr.reset(new Type());
deba@1207
    48
      } catch (...) {}
deba@1207
    49
    }
deba@1207
    50
deba@1207
    51
    ExceptionMember(const Type& type) throw () {
deba@1207
    52
      try {
deba@1207
    53
	ptr.reset(new Type());
deba@1207
    54
	if (ptr.get() == 0) return;
deba@1207
    55
	*ptr = type;
deba@1207
    56
      } catch (...) {}
deba@1207
    57
    }
deba@1207
    58
deba@1207
    59
    ExceptionMember(const ExceptionMember& copy) throw() {
deba@1207
    60
      try {
deba@1207
    61
	if (!copy.valid()) return;
deba@1207
    62
	ptr.reset(new Type());
deba@1207
    63
	if (ptr.get() == 0) return;
deba@1207
    64
	*ptr = copy.get();
deba@1207
    65
      } catch (...) {}
deba@1207
    66
    }
deba@1207
    67
deba@1207
    68
    ExceptionMember& operator=(const ExceptionMember& copy) {
deba@1207
    69
      if (ptr.get() == 0) return;
deba@1207
    70
      try {
deba@1207
    71
	if (!copy.valid()) return;
deba@1207
    72
 	*ptr = copy.get();
deba@1207
    73
      } catch (...) {}
deba@1207
    74
    }
deba@1207
    75
deba@1207
    76
    void set(const Type& type) {
deba@1207
    77
      if (ptr.get() == 0) return;
deba@1207
    78
      try {
deba@1207
    79
	*ptr = type;
deba@1207
    80
      } catch (...) {}
deba@1207
    81
    }
deba@1207
    82
deba@1207
    83
    const Type& get() const {
deba@1207
    84
      return *ptr;
deba@1207
    85
    }
deba@1207
    86
deba@1207
    87
    bool valid() const {
deba@1207
    88
      return ptr.get() != 0;
deba@1207
    89
    }
deba@1207
    90
    
deba@1207
    91
  private:
deba@1207
    92
    std::auto_ptr<_Type> ptr;
deba@1207
    93
  };
alpar@1151
    94
klao@1056
    95
  /// Exception-safe convenient "error message" class.
klao@1067
    96
klao@1067
    97
  /// Helper class which provides a convenient ostream-like (operator <<
klao@1067
    98
  /// based) interface to create a string message. Mostly useful in
klao@1067
    99
  /// exception classes (therefore the name).
klao@1056
   100
  class ErrorMessage {
klao@1056
   101
  protected:
klao@1067
   102
    ///\e 
klao@1157
   103
    ///\todo The good solution is boost:shared_ptr...
klao@1157
   104
    mutable
klao@1157
   105
    std::auto_ptr<std::ostringstream> buf;
klao@1056
   106
    
klao@1067
   107
    ///\e 
klao@1056
   108
    bool init() throw() {
klao@1056
   109
      try {
klao@1056
   110
	buf.reset(new std::ostringstream);
klao@1056
   111
      }
klao@1056
   112
      catch(...) {
klao@1056
   113
	buf.reset();
klao@1056
   114
      }
klao@1157
   115
      return buf.get();
klao@1056
   116
    }
klao@1056
   117
klao@1056
   118
  public:
klao@1056
   119
klao@1067
   120
    ///\e 
klao@1056
   121
    ErrorMessage() throw() { init(); }
klao@1056
   122
klao@1157
   123
    ErrorMessage(const ErrorMessage& em) throw() : buf(em.buf) { }
klao@1157
   124
klao@1067
   125
    ///\e 
klao@1056
   126
    ErrorMessage(const char *message) throw() {
klao@1056
   127
      init();
klao@1056
   128
      *this << message;
klao@1056
   129
    }
klao@1056
   130
klao@1067
   131
    ///\e 
klao@1056
   132
    ErrorMessage(const std::string &message) throw() {
klao@1056
   133
      init();
klao@1056
   134
      *this << message;
klao@1056
   135
    }
klao@1056
   136
klao@1067
   137
    ///\e 
klao@1056
   138
    template <typename T>
klao@1056
   139
    ErrorMessage& operator<<(const T &t) throw() {
klao@1157
   140
      if( ! buf.get() ) return *this;
klao@1056
   141
klao@1056
   142
      try {
klao@1056
   143
	*buf << t;
klao@1056
   144
      }
klao@1056
   145
      catch(...) {
klao@1056
   146
	buf.reset();
klao@1056
   147
      }
deba@1207
   148
      return *this;
klao@1056
   149
    }
klao@1056
   150
klao@1067
   151
    ///\e 
klao@1056
   152
    const char* message() throw() {
klao@1157
   153
      if( ! buf.get() ) return 0;
klao@1056
   154
klao@1056
   155
      const char* mes = 0;
klao@1056
   156
      try {
klao@1056
   157
	mes = buf->str().c_str();
klao@1056
   158
      }
klao@1056
   159
      catch(...) {}
klao@1056
   160
      return mes;
klao@1056
   161
    }
klao@1056
   162
    
klao@1056
   163
  };
klao@1056
   164
alpar@883
   165
  /**
alpar@883
   166
   * \brief Generic exception class.
alpar@883
   167
   *
klao@1056
   168
   * Base class for exceptions used in LEMON.
alpar@883
   169
   */
klao@1067
   170
  class Exception : public std::exception {
alpar@883
   171
  public:
klao@1067
   172
    ///\e 
klao@1120
   173
    Exception() {}
klao@1067
   174
    ///\e 
alpar@883
   175
    virtual ~Exception() throw() {}
klao@1120
   176
klao@1120
   177
    ///\e
klao@1120
   178
    virtual const char* exceptionName() const {
klao@1120
   179
      return "lemon::Exception";
klao@1120
   180
    }
alpar@883
   181
    
klao@1067
   182
    ///\e 
alpar@883
   183
    virtual const char* what() const throw() {
klao@1120
   184
      return exceptionName();
klao@1056
   185
    }
klao@1056
   186
  };
klao@1056
   187
klao@1120
   188
  /**
klao@1120
   189
   * \brief One of the two main subclasses of \ref Exception.
klao@1120
   190
   *
klao@1120
   191
   * Logic errors represent problems in the internal logic of a program;
klao@1120
   192
   * in theory, these are preventable, and even detectable before the
klao@1120
   193
   * program runs (e.g., violations of class invariants).
klao@1120
   194
   *
alpar@1125
   195
   * A typical example for this is \ref UninitializedParameter.
klao@1120
   196
   */
klao@1056
   197
  class LogicError : public Exception {
klao@1067
   198
  public:
klao@1120
   199
    virtual const char* exceptionName() const {
klao@1120
   200
      return "lemon::LogicError";
klao@1120
   201
    }
klao@1056
   202
  };
klao@1056
   203
alpar@1125
   204
  /**
alpar@1125
   205
   * \brief \ref Exception for uninitialized parameters.
alpar@1125
   206
   *
alpar@1125
   207
   * This error represents problems in the initialization
alpar@1125
   208
   * of the parameters of the algorithms.
alpar@1125
   209
   */
alpar@1125
   210
  class UninitializedParameter : public LogicError {
alpar@1125
   211
  public:
alpar@1125
   212
    virtual const char* exceptionName() const {
alpar@1125
   213
      return "lemon::UninitializedParameter";
alpar@1125
   214
    }
alpar@1125
   215
  };
alpar@1125
   216
klao@1120
   217
  
klao@1120
   218
  /**
klao@1120
   219
   * \brief One of the two main subclasses of \ref Exception.
klao@1120
   220
   *
klao@1120
   221
   * Runtime errors represent problems outside the scope of a program;
klao@1120
   222
   * they cannot be easily predicted and can generally only be caught as
klao@1120
   223
   * the program executes.
klao@1120
   224
   */
klao@1056
   225
  class RuntimeError : public Exception {
klao@1067
   226
  public:
klao@1120
   227
    virtual const char* exceptionName() const {
klao@1120
   228
      return "lemon::RuntimeError";
klao@1120
   229
    }
klao@1056
   230
  };
klao@1056
   231
klao@1067
   232
  ///\e
klao@1056
   233
  class RangeError : public RuntimeError {
klao@1067
   234
  public:
klao@1120
   235
    virtual const char* exceptionName() const {
klao@1120
   236
      return "lemon::RangeError";
klao@1120
   237
    }
klao@1056
   238
  };
klao@1056
   239
alpar@1061
   240
  ///\e 
klao@1056
   241
  class IOError : public RuntimeError {
klao@1067
   242
  public:
klao@1120
   243
    virtual const char* exceptionName() const {
klao@1120
   244
      return "lemon::IOError";
klao@1120
   245
    }
klao@1056
   246
  };
klao@1056
   247
alpar@1061
   248
  ///\e 
klao@1056
   249
  class DataFormatError : public IOError {
klao@1067
   250
  protected:
deba@1207
   251
    ExceptionMember<std::string> _message;
deba@1207
   252
    ExceptionMember<std::string> _file;
klao@1120
   253
    int _line;
klao@1157
   254
deba@1207
   255
    mutable ExceptionMember<std::string> _message_holder;
klao@1067
   256
  public:
klao@1157
   257
klao@1157
   258
    DataFormatError(const DataFormatError &dfe) : 
deba@1207
   259
      IOError(dfe), _message(dfe._message), _file(dfe._file),
deba@1207
   260
      _line(dfe._line) {}
klao@1157
   261
klao@1067
   262
    ///\e 
klao@1120
   263
    explicit DataFormatError(const char *the_message)
klao@1120
   264
      : _message(the_message), _line(0) {}
deba@1207
   265
klao@1067
   266
    ///\e 
klao@1056
   267
    DataFormatError(const std::string &file_name, int line_num,
klao@1120
   268
		    const char *the_message)
klao@1120
   269
      : _message(the_message), _line(line_num) { file(file_name); }
klao@1056
   270
klao@1067
   271
    ///\e 
deba@1207
   272
    void line(int line) { _line = line; }
klao@1067
   273
    ///\e 
deba@1207
   274
    void message(const std::string& message) { _message.set(message); }
klao@1120
   275
    ///\e 
deba@1207
   276
    void file(const std::string &file) { _file.set(file); }
deba@1207
   277
 
deba@1207
   278
    ///\e
deba@1207
   279
    int line() const { return _line; }
deba@1207
   280
    ///\e
deba@1207
   281
    const char* message() const { 
deba@1207
   282
      if (_message.valid() && !_message.get().empty()) {
deba@1207
   283
	return _message.get().c_str();
deba@1207
   284
      } else {
deba@1207
   285
	return 0;
klao@1056
   286
      }
alpar@883
   287
    }
alpar@883
   288
klao@1067
   289
    /// \brief Returns the filename.
klao@1067
   290
    ///
deba@1207
   291
    /// Returns \e null if the filename was not specified.
klao@1120
   292
    const char* file() const {
deba@1207
   293
      if (_file.valid() && !_file.get().empty()) {
deba@1207
   294
	return _file.get().c_str();
deba@1207
   295
      } else {
deba@1207
   296
	return 0;
deba@1207
   297
      }
klao@1067
   298
    }
klao@1067
   299
klao@1067
   300
    ///\e 
klao@1067
   301
    virtual const char* what() const throw() {
klao@1056
   302
      try {
klao@1056
   303
	std::ostringstream ostr;
alpar@1399
   304
	ostr << exceptionName() << ": ";
deba@1207
   305
	if (message()) ostr << message();
deba@1207
   306
	if( file() || line() != 0 ) {
klao@1056
   307
	  ostr << " (";
deba@1207
   308
	  if( file() ) ostr << "in file '" << file() << "'";
deba@1207
   309
	  if( file() && line() != 0 ) ostr << " ";
deba@1207
   310
	  if( line() != 0 ) ostr << "at line " << line();
klao@1067
   311
	  ostr << ")";
klao@1056
   312
	}
deba@1207
   313
	_message_holder.set(ostr.str());
klao@1056
   314
      }
deba@1207
   315
      catch (...) {}
deba@1207
   316
      if( _message_holder.valid()) return _message_holder.get().c_str();
klao@1120
   317
      return exceptionName();
klao@1120
   318
    }
klao@1120
   319
klao@1120
   320
    virtual const char* exceptionName() const {
klao@1056
   321
      return "lemon::DataFormatError";
klao@1056
   322
    }
klao@1067
   323
klao@1067
   324
    virtual ~DataFormatError() throw() {}
alpar@883
   325
  };
alpar@883
   326
deba@1213
   327
  class IOParameterError : public LogicError {
deba@1207
   328
  protected:
deba@1207
   329
    ExceptionMember<std::string> _message;
deba@1207
   330
    ExceptionMember<std::string> _file;
deba@1207
   331
deba@1207
   332
    mutable ExceptionMember<std::string> _message_holder;
deba@1207
   333
  public:
deba@1207
   334
deba@1213
   335
    IOParameterError(const IOParameterError &ile) : 
deba@1213
   336
      LogicError(ile), _message(ile._message), _file(ile._file) {}
deba@1207
   337
deba@1207
   338
    ///\e 
deba@1213
   339
    explicit IOParameterError(const char *the_message)
deba@1213
   340
      : _message(the_message) {}
deba@1207
   341
deba@1207
   342
    ///\e 
deba@1213
   343
    IOParameterError(const char *file_name, const char *the_message)
deba@1393
   344
      : _message(the_message), _file(file_name) {}
deba@1207
   345
deba@1207
   346
     ///\e 
deba@1207
   347
    void message(const std::string& message) { _message.set(message); }
deba@1207
   348
    ///\e 
deba@1207
   349
    void file(const std::string &file) { _file.set(file); }
deba@1207
   350
 
deba@1207
   351
     ///\e
deba@1207
   352
    const char* message() const { 
deba@1207
   353
      if (_message.valid()) {
deba@1207
   354
	return _message.get().c_str();
deba@1207
   355
      } else {
deba@1207
   356
	return 0;
deba@1207
   357
      }
deba@1207
   358
    }
deba@1207
   359
deba@1207
   360
    /// \brief Returns the filename.
deba@1207
   361
    ///
deba@1207
   362
    /// Returns \e null if the filename was not specified.
deba@1207
   363
    const char* file() const {
deba@1207
   364
      if (_file.valid()) {
deba@1207
   365
	return _file.get().c_str();
deba@1207
   366
      } else {
deba@1207
   367
	return 0;
deba@1207
   368
      }
deba@1207
   369
    }
deba@1207
   370
deba@1207
   371
    ///\e 
deba@1207
   372
    virtual const char* what() const throw() {
deba@1207
   373
      try {
deba@1207
   374
	std::ostringstream ostr;
deba@1207
   375
	if (message()) ostr << message();
deba@1207
   376
	if (file()) ostr << "(when reading file '" << file() << "')";
deba@1207
   377
	_message_holder.set(ostr.str());
deba@1207
   378
      }
deba@1207
   379
      catch (...) {}
deba@1207
   380
      if( _message_holder.valid() ) return _message_holder.get().c_str();
deba@1207
   381
      return exceptionName();
deba@1207
   382
    }
deba@1207
   383
deba@1207
   384
    virtual const char* exceptionName() const {
deba@1213
   385
      return "lemon::IOParameterError";
deba@1207
   386
    }
deba@1207
   387
deba@1213
   388
    virtual ~IOParameterError() throw() {}
deba@1207
   389
  };
deba@1207
   390
klao@1056
   391
klao@1068
   392
  ///\e
klao@1067
   393
  class AssertionFailedError : public LogicError {
klao@1067
   394
  protected:
klao@1067
   395
    const char *assertion;
klao@1067
   396
    const char *file;
klao@1067
   397
    int line;
klao@1067
   398
    const char *function;
klao@1067
   399
    const char *message;
deba@1213
   400
deba@1213
   401
    mutable ExceptionMember<std::string> _message_holder;
klao@1067
   402
  public:
klao@1067
   403
    ///\e
klao@1067
   404
    AssertionFailedError(const char *_file, int _line, const char *func,
klao@1067
   405
			 const char *msg, const char *_assertion = 0) :
klao@1067
   406
      assertion(_assertion), file(_file), line(_line), function(func),
klao@1067
   407
      message(msg) {}
klao@1067
   408
klao@1067
   409
    ///\e
klao@1067
   410
    const char* get_assertion() const { return assertion; }
klao@1067
   411
    ///\e
klao@1067
   412
    const char* get_message() const { return message; }
klao@1067
   413
    ///\e
klao@1067
   414
    const char* get_file() const { return file; }
klao@1067
   415
    ///\e
klao@1067
   416
    const char* get_function() const { return function; }
klao@1067
   417
    ///\e
klao@1067
   418
    int get_line() const { return line; }
klao@1067
   419
klao@1067
   420
klao@1067
   421
    virtual const char* what() const throw() {
klao@1067
   422
      try {
klao@1067
   423
	std::ostringstream ostr;
klao@1067
   424
	ostr << file << ":" << line << ": ";
klao@1067
   425
	if( function )
klao@1067
   426
	  ostr << function << ": ";
klao@1067
   427
	ostr << message;
klao@1067
   428
	if( assertion )
deba@1213
   429
	   ostr << " (assertion '" << assertion << "' failed)";
deba@1213
   430
	_message_holder.set(ostr.str());
klao@1209
   431
	return ostr.str().c_str();
klao@1067
   432
      }
klao@1067
   433
      catch(...) {}
deba@1213
   434
      if( _message_holder.valid() ) return _message_holder.get().c_str();
klao@1120
   435
      return exceptionName();
klao@1120
   436
    }
klao@1120
   437
klao@1120
   438
    virtual const char* exceptionName() const {
klao@1067
   439
      return "lemon::AssertionFailedError";
klao@1067
   440
    }
klao@1067
   441
klao@1067
   442
    virtual ~AssertionFailedError() throw() {}
klao@1067
   443
  };
klao@1067
   444
klao@1056
   445
klao@1056
   446
  /****************  Macros  ****************/
klao@1056
   447
klao@1056
   448
klao@1067
   449
  inline
klao@1067
   450
  void assert_fail(const char *file, int line, const char *func,
klao@1067
   451
		   const char *message, const char *assertion = 0,
klao@1067
   452
		   bool do_abort=true)
klao@1067
   453
  {
klao@1067
   454
    using namespace std;
klao@1067
   455
    cerr << file << ":" << line << ": ";
klao@1067
   456
    if( func )
klao@1067
   457
      cerr << func << ": ";
klao@1067
   458
    cerr << message;
klao@1067
   459
    if( assertion )
klao@1067
   460
      cerr << " (assertion '" << assertion << "' failed)";
klao@1067
   461
    cerr << endl;
klao@1067
   462
    if(do_abort)
klao@1067
   463
      abort();
klao@1067
   464
  }
klao@1056
   465
klao@1067
   466
  inline
klao@1067
   467
  void assert_fail_throw(const char *file, int line, const char *func,
klao@1067
   468
		   const char *message, const char *assertion = 0,
klao@1067
   469
		   bool = true)
klao@1067
   470
  {
klao@1067
   471
    throw AssertionFailedError(file, line, func, message, assertion);
klao@1067
   472
  }
klao@1056
   473
alpar@1151
   474
/// @}
alpar@883
   475
alpar@883
   476
}
alpar@921
   477
#endif // LEMON_ERROR_H
klao@1067
   478
klao@1067
   479
#undef LEMON_ASSERT
klao@1067
   480
#undef LEMON_FIXME
klao@1067
   481
klao@1067
   482
#ifndef LEMON_ASSERT_ABORT
klao@1067
   483
#  define LEMON_ASSERT_ABORT 1
klao@1067
   484
#endif
klao@1067
   485
klao@1067
   486
#ifndef LEMON_ASSERT_HANDLER
klao@1120
   487
#  ifdef LEMON_ASSERT_EXCEPTION
klao@1120
   488
#    define LEMON_ASSERT_HANDLER ::lemon::assert_fail_throw
klao@1120
   489
#  else
klao@1120
   490
#    define LEMON_ASSERT_HANDLER ::lemon::assert_fail
klao@1120
   491
#  endif
klao@1067
   492
#endif
klao@1067
   493
klao@1067
   494
#if defined(NDEBUG) || defined(LEMON_DISABLE_ASSERTS)
klao@1067
   495
klao@1067
   496
#  define LEMON_ASSERT(exp, msg)  (static_cast<void> (0))
klao@1067
   497
klao@1067
   498
#else
klao@1067
   499
klao@1067
   500
/**
klao@1067
   501
 * \brief Macro for assertions with customizable message
klao@1067
   502
 *
klao@1120
   503
 * Macro for assertions with customizable message.
klao@1120
   504
 *
klao@1120
   505
 * The behaviour can be customized with LEMON_ASSERT_HANDLER,
klao@1120
   506
 * LEMON_ASSERT_EXCEPTION and LEMON_ASSERT_ABORT defines. Asserts can be
klao@1120
   507
 * disabled by defining either NDEBUG or LEMON_DISABLE_ASSERTS macros.
klao@1120
   508
 *
klao@1120
   509
 * \todo We should provide some way to reset to the default behaviour,
klao@1120
   510
 * shouldn't we?
klao@1120
   511
 *
klao@1120
   512
 * \todo This whole 'assert' business should be placed in a separate
klao@1120
   513
 * include file.
klao@1120
   514
 *
klao@1067
   515
 * \todo __PRETTY_FUNCTION__ should be replaced by something
zsuzska@1274
   516
 * compiler-independent, like BOOST_CURRENT_FUNCTION
klao@1067
   517
 */
klao@1067
   518
klao@1067
   519
#  define LEMON_ASSERT(exp, msg)                 \
klao@1067
   520
     (static_cast<void> (!!(exp) ? 0 : (         \
klao@1067
   521
       LEMON_ASSERT_HANDLER(__FILE__, __LINE__,  \
klao@1067
   522
                            __PRETTY_FUNCTION__, \
klao@1067
   523
			    (msg), #exp, LEMON_ASSERT_ABORT), 0)))
klao@1067
   524
klao@1120
   525
#endif // NDEBUG || LEMON_DISABLE_ASSERTS
klao@1067
   526
klao@1067
   527
/**
klao@1067
   528
 * \brief Macro for mark not yet implemented features.
klao@1067
   529
 *
klao@1067
   530
 * \todo Is this the right place for this? It should be used only in
klao@1067
   531
 * modules under development.
klao@1067
   532
 *
klao@1067
   533
 * \todo __PRETTY_FUNCTION__ should be replaced by something
zsuzska@1274
   534
 * compiler-independent, like BOOST_CURRENT_FUNCTION
klao@1067
   535
 */
klao@1067
   536
klao@1067
   537
# define LEMON_FIXME(msg) \
klao@1067
   538
    (LEMON_ASSERT_HANDLER(__FILE__, __LINE__, __PRETTY_FUNCTION__, \
klao@1067
   539
			  "FIXME: " msg))