File: qgserror.sip

package info (click to toggle)
qgis 2.18.28%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,007,948 kB
  • sloc: cpp: 671,774; python: 158,539; xml: 35,690; ansic: 8,346; sh: 1,766; perl: 1,669; sql: 999; yacc: 836; lex: 461; makefile: 292
file content (82 lines) | stat: -rw-r--r-- 2,285 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
class QgsErrorMessage
{
%TypeHeaderCode
#include <qgserror.h>
%End
  public:
    /** Format */
    enum Format
    {
      Text, // Plain text
      Html
    };

    QgsErrorMessage();

    /** Constructor.
     *  @param theMessage error message string
     *  @param theTag error label, for example GDAL, GDAL Provider, Raster layer
     *  @param theFile the file where error was created
     *  @param theFunction the function where error was created
     *  @param theLine the line where error was created
     */
    QgsErrorMessage( const QString & theMessage, const QString & theTag = QString::null, const QString & theFile = QString::null, const QString & theFunction = QString::null, int theLine = 0 );

    QString message() const;
    QString tag() const;
    QString file() const;
    QString function() const;
    int line() const;
};

/** \ingroup core
 * 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.
*/
class QgsError
{
%TypeHeaderCode
#include <qgserror.h>
%End
  public:

    QgsError();

    /** Constructor with single message.
     *  @param theMessage error message
     *  @param theTag short description, e.g. GDAL, Provider, Layer
     */
    QgsError( const QString & theMessage, const QString & theTag );

    /** Append new error message.
     *  @param theMessage error message string
     *  @param theTag error label, for example GDAL, GDAL Provider, Raster layer
     */
    void append( const QString & theMessage, const QString & theTag );

    /** Append new error message.
     *  @param theMessage error message
     */
    void append( const QgsErrorMessage & theMessage );

    /** Test if any error is set.
     *  @return true if contains error
     */
    bool isEmpty() const;

    /** Full error messages description
     *  @param theFormat output format
     *  @return error report
     */
    QString message( QgsErrorMessage::Format theFormat = QgsErrorMessage::Html ) const;

    /** Short error description, usually the first error in chain, the real error.
     *  @return error description
     */
    QString summary() const;

    /** Clear error messages */
    void clear();
};