Throw exception instead of printing to console.