0

I am looking for non-vulgar code that throws an exception when a UNIxs, and more specifically linux, system function returns an error.

Said code should skip throwing exceptions when there is no error. ( For example when errno is EAGAIN for a nonblocking read ). And preferably contain FILE and LINE of the line that the exception is thrown from.

I am very much uncertain whiat is going on with the new exception system and in particular the differences between system_catecories and generic_categories and where errno and strerror fit into it all.

1
  • Either code it by yourself, or consider using a framework like POCO Commented May 4, 2014 at 7:03

1 Answer 1

1

You can find out how it works by exploring the Boost.System library, which is where the relevant part of the C++ standard originated from.

To see how it may be used you can check out the Boost.Filesystem library, which depends on Boost.System and is likely to become part of the standard in the future.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.