Throw different type of exceptions in case of various errors