Quick links: Tutorial - Examples - Files - Symbols.
Classes: Hierarchy - Index - List - Members.
Namespaces: Index - base - cs - display.

Public Member Functions | Static Public Attributes | List of all members
cogitant::ExceptionXml Class Reference

Exception due à un problème de format non respecté : format XML non respecté. More...

#include "xmlio.h"

Inheritance diagram for cogitant::ExceptionXml:
cogitant::ExceptionIO cogitant::Exception

Public Member Functions

 ExceptionXml (unsigned int error, std::string const &arg, std::string const &streamname, unsigned int line)
 Constructeur. More...
 
std::string toString () const
 Message d'erreur "en clair". More...
 
- Public Member Functions inherited from cogitant::ExceptionIO
 ExceptionIO (unsigned int t=NOTYPE)
 Constructeur avec code d'erreur. More...
 
 ExceptionIO (unsigned int t, std::string const &streamname, IStream::Line line=0, std::string const &what="")
 Constructeur complet. More...
 
 ~ExceptionIO () throw ()
 Destructeur. More...
 
IStream::Line line () const
 Ligne où l'erreur a été détectée. More...
 
std::string const & streamName () const
 Ligne où l'erreur a été détectée. More...
 
- Public Member Functions inherited from cogitant::Exception
const char * what () const throw ()
 Accès au message d'erreur selon la méthode standard de la bibliothèque C++. More...
 
std::string const & message () const
 Accesseur au message d'erreur. More...
 
unsigned int code () const
 Sous code d'erreur. More...
 
std::string className () const
 Nom de la classe. More...
 
 Exception (unsigned int code=0, std::string const &message="")
 Constructeur d'une exception. More...
 
virtual ~Exception () throw ()
 Destructeur. More...
 

Static Public Attributes

static const unsigned int CLOSE_WITHOUT_OPEN
 Une balise de fermeture est lue alors qu'aucune balise n'était ouverte. More...
 
static const unsigned int WRONG_CLOSE
 Une balise de fermeture est lue alors que la balise ouverte courante est d'un autre intitulé. More...
 
static const unsigned int TEXT_OUTSIDE_ELEMENT
 Du texte est lu en dehors de toute balise, le flux lu ne respecte donc pas le format XML. More...
 
static const unsigned int PREMATURE_EOF
 La fin du fichier a été atteinte alors qu'une balise n'est pas fermée. More...
 
static const unsigned int UNKNOWN_ENTITY
 Une entite (entourée de "&" et ";") trouvée est inconnue. More...
 
static const unsigned int TWO_ROOTS
 L'analyseur a trouvé plusieurs éléments racines. More...
 
static const unsigned int WRONG_DOCTYPEDECLARATION_PARENT
 Il y a une déclaration DOCTYPE qui n'est pas à l'extérieur de toute balise. More...
 
static const unsigned int WRONG_DOCTYPEDECLARATION
 Il y a une déclaration qui n'est pas DOCTYPE. More...
 
static const unsigned int WRONG_ENTITYDECLARATION
 Il y a une déclaration d'entité qui n'est pas ENTITY. More...
 
static const unsigned int UNKNOWN_FORMAT
 Format inconnu. More...
 
static const unsigned int INVALID_DOCUMENT
 DTD non respectée. More...
 
- Static Public Attributes inherited from cogitant::ExceptionIO
static const unsigned int NOTYPE
 Type d'erreur E/S non défini.
 
static const unsigned int OPEN
 Impossible d'ouvrir le fichier en lecture.
 
static const unsigned int CREATE
 Impossible d'ouvrir le fichier en écriture.
 
static const unsigned int READ
 Erreur lors de la lecture.
 
static const unsigned int WRITE
 Erreur lors de l'écriture.
 
static const unsigned int FORMAT
 Format inconnu. More...
 
static const unsigned int HEADER
 Signature du format non reconnu. More...
 
static const unsigned int CONNECT
 Erreur de connexion.
 
static const unsigned int ENDOFSTREAM
 Tentative de lecture après la fin d'un flux.
 
static const unsigned int CHECK
 Vérifications diverses.
 

Additional Inherited Members

- Public Attributes inherited from cogitant::ExceptionIO
std::string m_streamname
 Nom du flux contenant l'erreur. More...
 
IStream::Line m_line
 Ligne du flux contenant l'erreur. More...
 
- Protected Member Functions inherited from cogitant::Exception
std::string messageAsIdToString () const
 Convertit le message de l'exception en entête de string (pour toString()) en considérant le message comme un iSet. More...
 

Detailed Description

Exception due à un problème de format non respecté : format XML non respecté.

Constructor & Destructor Documentation

◆ ExceptionXml()

cogitant::ExceptionXml::ExceptionXml ( unsigned int  error,
std::string const &  arg,
std::string const &  streamname,
unsigned int  line 
)

Constructeur.

Member Function Documentation

◆ toString()

std::string cogitant::ExceptionXml::toString ( ) const
virtual

Message d'erreur "en clair".

Par défaut toString() retourne le nom de la classe d'exceptions (className()) suivi du message.

Reimplemented from cogitant::ExceptionIO.

Member Data Documentation

◆ CLOSE_WITHOUT_OPEN

const unsigned int cogitant::ExceptionXml::CLOSE_WITHOUT_OPEN
static

Une balise de fermeture est lue alors qu'aucune balise n'était ouverte.

◆ INVALID_DOCUMENT

const unsigned int cogitant::ExceptionXml::INVALID_DOCUMENT
static

DTD non respectée.

Ce code d'exception peut être utilisé pour lever des exceptions suite à l'analyse du XmlDocument produit par l'opération, si ce document n'a pas le bon format. Ce type d'exception n'est jamais levé par l'opération, qui ne vérifie que le respect des règles syntaxiques de XML, mais pas la DTD.

◆ PREMATURE_EOF

const unsigned int cogitant::ExceptionXml::PREMATURE_EOF
static

La fin du fichier a été atteinte alors qu'une balise n'est pas fermée.

◆ TEXT_OUTSIDE_ELEMENT

const unsigned int cogitant::ExceptionXml::TEXT_OUTSIDE_ELEMENT
static

Du texte est lu en dehors de toute balise, le flux lu ne respecte donc pas le format XML.

◆ TWO_ROOTS

const unsigned int cogitant::ExceptionXml::TWO_ROOTS
static

L'analyseur a trouvé plusieurs éléments racines.

◆ UNKNOWN_ENTITY

const unsigned int cogitant::ExceptionXml::UNKNOWN_ENTITY
static

Une entite (entourée de "&" et ";") trouvée est inconnue.

◆ UNKNOWN_FORMAT

const unsigned int cogitant::ExceptionXml::UNKNOWN_FORMAT
static

Format inconnu.

La déclaration DOCTYPE décrit un format qui est inconnu. Ce type d'exception n'est jamais levé par l'opération, qui ne vérifie que le respect des règles syntaxiques de XML, mais pas la DTD.

◆ WRONG_CLOSE

const unsigned int cogitant::ExceptionXml::WRONG_CLOSE
static

Une balise de fermeture est lue alors que la balise ouverte courante est d'un autre intitulé.

◆ WRONG_DOCTYPEDECLARATION

const unsigned int cogitant::ExceptionXml::WRONG_DOCTYPEDECLARATION
static

Il y a une déclaration qui n'est pas DOCTYPE.

◆ WRONG_DOCTYPEDECLARATION_PARENT

const unsigned int cogitant::ExceptionXml::WRONG_DOCTYPEDECLARATION_PARENT
static

Il y a une déclaration DOCTYPE qui n'est pas à l'extérieur de toute balise.

◆ WRONG_ENTITYDECLARATION

const unsigned int cogitant::ExceptionXml::WRONG_ENTITYDECLARATION
static

Il y a une déclaration d'entité qui n'est pas ENTITY.