Throw Error instead of string