3 ms·
Now compare a method with multiple lines and code paths, all with potential failures. The problem with returning error codes is that you have to handle it for
by flukus 10y ago
Now compare a method with multiple lines and code paths, all with potential failures.
The problem with returning error codes is that you have to handle it for every external call, with exceptions you don't. The contrived examples hide this.