QGIS/python/core/qgserror.sip

135 lines
3.3 KiB
Plaintext
Raw Normal View History

2017-05-14 09:48:41 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgserror.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
2013-04-08 18:25:44 +02:00
class QgsErrorMessage
{
2017-05-14 09:48:41 +02:00
%Docstring
QgsErrorMessage represents single error message.
%End
2013-04-08 18:25:44 +02:00
%TypeHeaderCode
2017-05-14 09:48:41 +02:00
#include "qgserror.h"
2013-04-08 18:25:44 +02:00
%End
public:
enum Format
{
2017-05-14 09:48:41 +02:00
Text,
2013-04-08 18:25:44 +02:00
Html
};
QgsErrorMessage();
QgsErrorMessage( const QString &message, const QString &tag = QString::null, const QString &file = QString::null, const QString &function = QString::null, int line = 0 );
2017-05-14 09:48:41 +02:00
%Docstring
Constructor.
\param message error message string
\param tag error label, for example GDAL, GDAL Provider, Raster layer
\param file the file where error was created
\param function the function where error was created
\param line the line where error was created
%End
2013-04-08 18:25:44 +02:00
QString message() const;
2017-05-14 09:48:41 +02:00
%Docstring
:rtype: str
%End
2013-04-08 18:25:44 +02:00
QString tag() const;
2017-05-14 09:48:41 +02:00
%Docstring
:rtype: str
%End
2013-04-08 18:25:44 +02:00
QString file() const;
2017-05-14 09:48:41 +02:00
%Docstring
:rtype: str
%End
2013-04-08 18:25:44 +02:00
QString function() const;
2017-05-14 09:48:41 +02:00
%Docstring
:rtype: str
%End
2013-04-08 18:25:44 +02:00
int line() const;
2017-05-14 09:48:41 +02:00
%Docstring
:rtype: int
%End
2013-04-08 18:25:44 +02:00
};
class QgsError
{
2017-05-14 09:48:41 +02:00
%Docstring
QgsError is container for error messages (report). It may contain chain
(sort of traceback) of error messages (e.g. GDAL - provider - layer).
Higher level messages are appended at the end.
%End
2013-04-08 18:25:44 +02:00
%TypeHeaderCode
2017-05-14 09:48:41 +02:00
#include "qgserror.h"
2013-04-08 18:25:44 +02:00
%End
public:
QgsError();
QgsError( const QString &message, const QString &tag );
2017-05-14 09:48:41 +02:00
%Docstring
Constructor with single message.
\param message error message
\param tag short description, e.g. GDAL, Provider, Layer
%End
2013-04-08 18:25:44 +02:00
void append( const QString &message, const QString &tag );
2017-05-14 09:48:41 +02:00
%Docstring
Append new error message.
\param message error message string
\param tag error label, for example GDAL, GDAL Provider, Raster layer
%End
2013-04-08 18:25:44 +02:00
void append( const QgsErrorMessage &message );
2017-05-14 09:48:41 +02:00
%Docstring
Append new error message.
\param message error message
%End
2013-04-08 18:25:44 +02:00
bool isEmpty() const;
2017-05-14 09:48:41 +02:00
%Docstring
Test if any error is set.
:return: true if contains error
:rtype: bool
%End
2013-04-08 18:25:44 +02:00
QString message( QgsErrorMessage::Format format = QgsErrorMessage::Html ) const;
2017-05-14 09:48:41 +02:00
%Docstring
Full error messages description
\param format output format
:return: error report
:rtype: str
%End
2013-04-08 18:25:44 +02:00
QString summary() const;
2017-05-14 09:48:41 +02:00
%Docstring
Short error description, usually the first error in chain, the real error.
:return: error description
:rtype: str
%End
2013-04-08 18:25:44 +02:00
void clear();
2017-05-14 09:48:41 +02:00
%Docstring
Clear error messages
%End
2013-04-08 18:25:44 +02:00
};
2017-05-14 09:48:41 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgserror.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/