Are there are any performance cost by creating, throwing and catching exceptions in Java?
I am planing to add \'exception driven development\' into a larger project.
Personally, I think that's a bad and obnoxious idea.
The usual way to encourage people to check for null values is to use annotations like @Nullable (and its opposite, @NotNull, for functions that are guaranteed to return non-nulls). By setting up similar annotations on parameters (so that parameter expectations are set), quality IDEs and bug-checkers (like FindBugs) can then generate all the necessary warnings when the code doesn't do enough checking.
Those annotations are available in JSR-305, and apparently there is also a reference implementation.
As far as performance goes, creating the exception is the expensive part (I've read that it's due to the stacktrace-filling, among other things). Throwing the exception is cheap, and is a control-transfer technique used in JRuby.