Argoday / IPL

IPL is a C++ template meta-programming based Image Processing Library designed for quick and easy implementation of Computer Vision and Computer Graphics algorithms while preserving runtime performance. Integrates with Qt, LibPNG, and FFMPEG
Other
8 stars 3 forks source link

Decide on an Error reporting strategy #7

Open Argoday opened 12 years ago

Argoday commented 12 years ago

Error reporting is not currently handled in ALIB ... obviously this needs to change, however I have not decided on a strategy to support error reporting.

Some of the things to consider:

Argoday commented 12 years ago

Error Codes could work as:

1 - Returned Error code with non-const parameter return

Requires named-parameter passing, ex:

Image<T> img;
if( Image::IO::read("test.png",img) == ErrorCode::Error ) {
    //Error occured
}

2 - Non-const parameter Error Code

Requires named error code checking, ex:

ErrorCode e;
Image<T> img = Image::IO::read("test.png",e);
if( e == ErrorCode::Error) {
    //Error occured
}