com.colisweb.gdrive.client.GoogleError.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of google-drive-scala-client_2.13 Show documentation
Show all versions of google-drive-scala-client_2.13 Show documentation
Google Drive Scala Client is a Scala wrapper around the Google Drive client for Java
The newest version!
package com.colisweb.gdrive.client
import com.colisweb.gdrive.client.sheets.GoogleSpreadsheetId
import eu.timepit.refined.types.numeric.NonNegInt
sealed trait GoogleError extends Exception
final case class FolderNotFound(keywords: String) extends GoogleError
final case class SpreadsheetNotFound(keywords: String) extends GoogleError
final case class CsvFileNotFound(keywords: String) extends GoogleError
final case class FileNotFound(keywords: String) extends GoogleError
final case class DataSourceIdNotFound(keywords: String) extends GoogleError
case class SpreadsheetError(keywords: String) extends Exception(keywords) with GoogleError
object EmptySpreadsheet extends SpreadsheetError("The spreadsheet is empty")
object NoColumnInSpreadsheet {
def apply(spreadsheetId: GoogleSpreadsheetId, column: String, row: NonNegInt): SpreadsheetError = {
SpreadsheetError(s"No column `$column` in spreadsheet `$spreadsheetId` at row $row")
}
}