Replaced an array of string to Error object.