src/RelpipeException.cpp
author František Kučera <franta-hg@frantovo.cz>
Fri, 22 Nov 2019 15:27:30 +0100
branchv_0
changeset 19 2999fca726f3
parent 18 src/Iconv.cpp@9d566568d37c
child 29 f5f4eec9ac85
permissions -rw-r--r--
RelpipeException
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     1
/**
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     2
 * Relational pipes (library)
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     3
 * Copyright © 2019 František Kučera (Frantovo.cz, GlobalCode.info)
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     4
 *
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     5
 * This program is free software: you can redistribute it and/or modify
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     6
 * it under the terms of the:
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     7
 *  - GNU Lesser General Public License as published by the Free Software Foundation;
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     8
 *    version 3 of the License or (at your option)
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
     9
 *  - GNU General Public License as published by the Free Software Foundation;
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    10
 *    version 2 of the License.
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    11
 *
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    12
 * This program is distributed in the hope that it will be useful,
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    15
 * GNU General Public License for more details.
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    16
 *
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    18
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    19
 */
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    20
19
2999fca726f3 RelpipeException
František Kučera <franta-hg@frantovo.cz>
parents: 18
diff changeset
    21
#include "../include/relpipe/common/RelpipeException.h"
18
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    22
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    23
namespace relpipe {
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    24
namespace common {
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    25
19
2999fca726f3 RelpipeException
František Kučera <franta-hg@frantovo.cz>
parents: 18
diff changeset
    26
class RelpipeException::RelpipeExceptionInternal {
18
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    27
public:
19
2999fca726f3 RelpipeException
František Kučera <franta-hg@frantovo.cz>
parents: 18
diff changeset
    28
	std::string message;
18
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    29
19
2999fca726f3 RelpipeException
František Kučera <franta-hg@frantovo.cz>
parents: 18
diff changeset
    30
	virtual ~RelpipeExceptionInternal() {
18
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    31
	}
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    32
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    33
};
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    34
19
2999fca726f3 RelpipeException
František Kučera <franta-hg@frantovo.cz>
parents: 18
diff changeset
    35
RelpipeException::RelpipeException(std::string message) {
2999fca726f3 RelpipeException
František Kučera <franta-hg@frantovo.cz>
parents: 18
diff changeset
    36
	internal = new RelpipeExceptionInternal();
2999fca726f3 RelpipeException
František Kučera <franta-hg@frantovo.cz>
parents: 18
diff changeset
    37
	internal->message = message;
18
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    38
}
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    39
19
2999fca726f3 RelpipeException
František Kučera <franta-hg@frantovo.cz>
parents: 18
diff changeset
    40
RelpipeException::~RelpipeException() {
18
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    41
	delete internal;
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    42
}
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    43
19
2999fca726f3 RelpipeException
František Kučera <franta-hg@frantovo.cz>
parents: 18
diff changeset
    44
std::string RelpipeException::getMessge() {
2999fca726f3 RelpipeException
František Kučera <franta-hg@frantovo.cz>
parents: 18
diff changeset
    45
	return internal->message;
18
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    46
}
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    47
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    48
}
9d566568d37c Iconv and TextCodec classes for converting text encodings
František Kučera <franta-hg@frantovo.cz>
parents:
diff changeset
    49
}