Still less tedious than the other way.
No, certainly NOT!
For the record, I was being sarcastic. Based on the vague, ambiguous
way the question was worded, I don't see how the OP could expect an
intelligent, informed response.
That type of response would depend on what the OP actually meant,
which is anyone's guess. If he's talking about creating a new,
separate exception class for every single place where "errors"
(whatever that means) might occur, simply to identify the location of
the errors in his log file, then I would in fact recommend that he use
some sort of error numbering scheme instead.
The exception system was designed for a good reason.
Wherever it makes sense to handle different exceptions differently within
the application, use different exception classes so that you can make use
of catch clauses at the appropriate scope.
A counterexample would be SQLException. You might handle a duplicate
key exception differently than you would a hosed DB connection
exception. To know which on you were dealing with, however, you would
have to call getErrorCode() on the SQLException.