summaryrefslogtreecommitdiffstats
path: root/utils/storage
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2010-10-12 14:20:23 +0800
committerPeng Wu <alexepico@gmail.com>2010-10-12 14:20:23 +0800
commite2e105eee7426cb75568f4954373e11c77f09d04 (patch)
tree4b40eb3d6c94f2d12d5a407280893616547eb5a0 /utils/storage
parent774f0353ae5a8f84b228b9a91a0b09e27e065f2d (diff)
downloadlibpinyin-e2e105eee7426cb75568f4954373e11c77f09d04.tar.gz
libpinyin-e2e105eee7426cb75568f4954373e11c77f09d04.tar.xz
libpinyin-e2e105eee7426cb75568f4954373e11c77f09d04.zip
add error printf
Diffstat (limited to 'utils/storage')
-rw-r--r--utils/storage/export_interpolation.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/storage/export_interpolation.cpp b/utils/storage/export_interpolation.cpp
index cf102a1..c5fa790 100644
--- a/utils/storage/export_interpolation.cpp
+++ b/utils/storage/export_interpolation.cpp
@@ -155,6 +155,7 @@ static const char * special_token_to_string(phrase_token_t token){
return pair->string;
}
+ fprintf(stderr, "error: unknown token:%d.\n", token);
return NULL;
}
@@ -169,8 +170,10 @@ char * token_to_string(FacadePhraseIndex * phrase_index, phrase_token_t token) {
}
int result = phrase_index->get_phrase_item(token, item);
- if (result != ERROR_OK)
+ if (result != ERROR_OK) {
+ fprintf(stderr, "error: unknown token:%d.\n", token);
return NULL;
+ }
item.get_phrase_string(buffer);
guint8 length = item.get_phrase_length();