示例#1
0
文件: api.cpp 项目: Eclipse06/loot
unsigned int c_error(const loot::error& e) {
    delete[] extMessageStr;
    try {
        extMessageStr = new char[strlen(e.what()) + 1];
        strcpy(extMessageStr, e.what());
    }
    catch (std::bad_alloc& e) {
        extMessageStr = NULL;
    }
    return e.code();
}
示例#2
0
文件: api.cpp 项目: FTWahid/loot
unsigned int c_error(const loot::error& e) {
    extMessageStr = e.what();
    return e.code();
}