Throwing an error in case of misuse (instead of crash)