This should probably be console.error() instead of throw.