projects
/
platform
/
upstream
/
ibus-libpinyin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a09afd5
)
Add error handler for call of OpenCC
author
BYVoid
<byvoid1@gmail.com>
Fri, 18 Jun 2010 05:54:33 +0000
(13:54 +0800)
committer
BYVoid
<byvoid1@gmail.com>
Mon, 5 Jul 2010 07:50:54 +0000
(15:50 +0800)
src/SimpTradConverter.cc
patch
|
blob
|
history
diff --git
a/src/SimpTradConverter.cc
b/src/SimpTradConverter.cc
index
e9a0514
..
3c8d371
100644
(file)
--- a/
src/SimpTradConverter.cc
+++ b/
src/SimpTradConverter.cc
@@
-46,7
+46,12
@@
SimpTradConverter::simpToTrad (const gchar *in, String &out)
inbuf = (const char *) in;
- conv.convert (inbuf, outbuf);
+ if (conv.convert (inbuf, outbuf) == -1)
+ {
+ g_warning ("An error occurs in SimpTradConverter:");
+ conv.perror ();
+ return;
+ }
out << outbuf.c_str ();
}