Hurricane VLSI Database


List of all members | Public Member Functions | Static Public Member Functions
Hurricane::Exception Class Referenceabstract

Exception description (API) More...

Inheritance diagram for Hurricane::Exception:
Inheritance graph
[legend]

Public Member Functions

string what () const
 
string textWhat () const
 
string htmlWhat () const
 

Static Public Member Functions

static void setTextTranslator (const TextTranslator &translator)
 
static void setHtmlTranslator (const TextTranslator &translator)
 

Detailed Description

Exception description (API)

Introduction

The Exception class groups all exceptions thrown by functions from the API. This virtual class is only useful to catch exceptions originating from one of those functions.

Remarks
Copy construction is disabled.

Example

try {
// do something
}
catch (Exception& exception) {
// Go through here if the exception comes from a function of the API
cerr << exception.what() << endl;
exit(1);
}
catch (...) {
// Go through here for all other system exceptions
cerr << Error("abnormal termination") << endl;
// We use the Error() in order to get the same kind of printing
exit(2);
}

Member Function Documentation

◆ what()

string Hurricane::Exception::what ( ) const
inline

Returns: an alias over the textWhat() method for convenience.

References textWhat().

◆ textWhat()

string Hurricane::Exception::textWhat ( ) const
inline

Returns: an informative (hopefully) about what has caused the exception to occurs. Formatted for an output on a tty.

See also
setTextTranslator

Referenced by what().

◆ htmlWhat()

string Hurricane::Exception::htmlWhat ( ) const
inline

Returns: an informative (hopefully) about what has caused the exception to occurs. Formatted for an output on a HTML capable device.

See also
setHtmlTranslator

◆ setTextTranslator()

string Hurricane::Exception::setTextTranslator ( const TextTranslator &  translator)
inlinestatic

Set the translator used for text (tty) output.

◆ setHtmlTranslator()

string Hurricane::Exception::setHtmlTranslator ( const TextTranslator &  translator)
inlinestatic

Set the translator used for HTML (hint: Qt manage simple HTML in text) output.


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


Generated by doxygen 1.9.1 on Thu Aug 11 2022 Return to top of page
Hurricane VLSI Database Copyright © 2000-2020 Bull S.A. All rights reserved