Skip to content

a1iive/oberror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to build

cd oberror
make

ob_error will generated in YOUR_OBERROR_PATH/build/bin by default.

make install

ob_error will be installed in /usr/local/bin by default.

How to use

ob_error --help

You can get the user manual by --help option.

How to add error cause/solution

This part is for developers.

For example:

The ob error 4000 in src/ob_errno.def defined as

DEFINE_ERROR(OB_ERROR, -4000, -1, "HY000", "Common error");

If you want to add the cause and solution info, you can change the define as

DEFINE_ERROR(OB_ERROR, -4000, -1, "HY000", "Common error", "CAUSE", "SOLUTION");

And then regenerate the src/lib/ob_errno.hsrc/ob_errno.h and src/ob_errno.cpp by

cd src
./gen_ob_errno.pl

Finally back to oberror dir and remake

cd ..
make && make install

About

ob_error tools.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published