Generated on for Gecode by doxygen 1.17.0
Test::Instance::Error Class Reference

Exception for errors in specs and instance files More...

#include <gecode/instance.hh>

Public Member Functions

 Error (const std::string &m)
 Initialize with message m.
virtual const char * what (void) const noexcept override
 Return the full message.
Public Member Functions inherited from Gecode::Exception
 Exception (const char *l, const char *i) noexcept
 Initialize with location l and information i.

Protected Attributes

std::string msg
 The full message.

Detailed Description

Exception for errors in specs and instance files

The message gives the location (file, line, and column), the offending line, and the path through the spec at the point of the error. The instance module reports every error in a spec or an instance by throwing this exception and never writes diagnostics itself; programs that check the data they read can throw it as well. Running out of memory throws MemoryExhausted or std::bad_alloc.

Definition at line 337 of file instance.hh.

Constructor & Destructor Documentation

◆ Error()

Gecode::Instance::Error::Error ( const std::string & m)
explicit

Initialize with message m.

Definition at line 52 of file data.cpp.

Member Function Documentation

◆ what()

const char * Gecode::Instance::Error::what ( void ) const
overridevirtualnoexcept

Return the full message.

Reimplemented from Gecode::Exception.

Definition at line 56 of file data.cpp.

Member Data Documentation

◆ msg

std::string Gecode::Instance::Error::msg
protected

The full message.

Definition at line 340 of file instance.hh.


The documentation for this class was generated from the following files: