#include <dcl/Config.h>
#include <dcl/Object.h>
#include <dcl/Charset.h>
#include <dcl/Thread.h>
#include <dcl/SQL.h>
Go to the source code of this file.
◆ IMPLEMENT_CLASSINFO()
Definition at line 24 of file SQLException.cpp.
27{
29#ifdef __DCL_DEBUG
30 if (_connHandle->errorFileName())
31 {
32 r = _connHandle->errorFileName();
35 }
36#endif
37
39 {
40 r += _connHandle->serverTitle();
42
43 ByteString s;
45 ByteBuffer*
buf = ByteBuffer::create(
n);
46 bool b = _connHandle->getErrorMessage(
buf->data(), &
n);
47 if (b) {
48 buf->__dataLength =
n;
50 }
52
53 if (s.length() > 0) {
54 try {
55 r += UTF8Decoder::decode(s);
56 }
58
60 }
61 }
62 else {
63 r +=
__T(
"The Server Error Message is unavailable!!");
64 }
65 }
66 else {
69 CharBuffer*
buf = CharBuffer::create_e(
n);
71 {
72 if (
buf->__allocLength <
n) {
73 CharBuffer::extend(
buf,
n);
74 }
76 }
77 r.append(
buf->data(),
n);
79 }
80
82}
void CharsetConvertException *size_t n
String toString(unsigned _base=10) const
static bool getErrorMessage(wchar_t *_buf, size_t *_buflen, Error _errorCode)