error.cc
来自「xprobe package sources code」· CC 代码 · 共 31 行
CC
31 行
#include <usi++/usi++.h>/* Example for libusi++ error-handling. * We try to set a filter on an NOT initialized device. * MUST BE LINKED STATIC with usi++. (somehow C++ exceptions dont work with .so) */int main(){ TCP *x = new TCP("127.0.0.1"); /* turn on using exceptions */ useException(true); try { x->setfilter("false"); } catch (usifault &u) { printf("Caught exception: %s\n", u.why()); } printf("Try to setfilter again.\n"); /* use normal error-handling (default) and let usi++ * generate nice error-messages and exiting */ useException(false); x->setfilter("false"); /* NOT reached */}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?