Designing a class with **Exceptions** -
When I design a class, I often have trouble deciding the problem if I should throw an exception or 2 value with 2 func In case of 2 functions, how should I name the exception and exception method? For example, if I wrote a class that breaks any stream and errors in the current or incomplete, then I will throw an exception. However, if the app is trying to recover data from the stream and leaves an error? Instead of wanting the price instead? So how should I name the second function?
Should not I be both an exception method and an exception method?
Or should not I be both an exception method and an exception method?
She Burn time
to maintain two different but mostly-identical methods If you really need to allow the client which errors are irreversible If you do not believe, then point them only with one return value and be done with it ... Otherwise, write the exception-throwing version and the customer who hovers two strange errors handles the exception.
Comments
Post a Comment