I went through several discussion, tutorials etc. and I've a feeling like there is no way to inform the user using prototype, that his function might throw an exception.
For instance:
/* AudioStream.h */
class AudioStream
{
int open(struct stream_settings &settings);
}
/* AudioStream.cpp */
int AudioStream::open(struct stream_settings &settings)
{
int err;
err = snd_pcm_open(...);
if (err < 0)
{
/* Throw some exception here */
}
}
If the final product ends up in a library with a header. How does one figures out, that the open function throws an exception and it's necessary to put it into a try/catch block?
Thank you for all the great answers.