Currently, we're using throws of strings in certain cases (like content parsing), and just returning different kinds of strings in other cases (like sending emails), to differentiate between success and failure of an operation.
Can we instead use a special result type to signify things that can fail expectedly?
Kind of like railway oriented programming?
Currently, we're using
throws of strings in certain cases (like content parsing), and just returning different kinds of strings in other cases (like sending emails), to differentiate between success and failure of an operation.Can we instead use a special result type to signify things that can fail expectedly?
Kind of like railway oriented programming?