errorEnum function

YoutubeError errorEnum(
  1. int errorCode
)

Implementation

YoutubeError errorEnum(int errorCode) {
  switch (errorCode) {
    case 2:
      return YoutubeError.invalidParam;
    case 5:
      return YoutubeError.html5Error;
    case 100:
      return YoutubeError.videoNotFound;
    case 101:
      return YoutubeError.notEmbeddable;
    case 105:
      return YoutubeError.cannotFindVideo;
    case 150:
      return YoutubeError.sameAsNotEmbeddable;
    default:
      return YoutubeError.unknown;
  }
}