I have a method in my Java code that takes a logger as a param. What I need to know is if it is best practice to throw a special exception if the logger passed in is null?
Right now if I test it with a null logger it throws a nasty java.lang.nullPointer exception.
public static void sendLogMessage(Logger logger){
if(logger!=null){
//Do something sweet here
}else{
//throw exception?
}