exception.cc
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include "gecode/kernel.hh"
00023
00024 namespace Gecode {
00025
00026
00027
00028
00029
00030 Exception::Exception(const char* l, const char* i) throw() {
00031 int j = 0;
00032 while ((*l != 0) && (j < li_max))
00033 li[j++] = *(l++);
00034 if (j < li_max)
00035 li[j++] = ':';
00036 if (j < li_max)
00037 li[j++] = ' ';
00038 while ((*i != 0) && (j < li_max))
00039 li[j++] = *(i++);
00040 li[j] = 0;
00041 }
00042 const char*
00043 Exception::what(void) const throw() {
00044 return &li[0];
00045 }
00046
00047 }
00048
00049