Throw error instead of string