Skip to content

Commit

Permalink
Rename UndecodableCharError
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Jun 6, 2024
1 parent 74e892c commit bbdecfd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/engine/install.scala
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ object Installation:
case StreamError(_) => abort(ConfigError(msg"The stream was cut while reading a file"))
case error: AggregateError[?] => abort(ConfigError(msg"Could not read the configuration file"))
case EnvironmentError(variable) => abort(ConfigError(msg"The environment variable $variable could not be accessed"))
case error: UndecodableCharError => abort(ConfigError(msg"The configuration file contained bad character data"))
case error: CharDecodeError => abort(ConfigError(msg"The configuration file contained bad character data"))
case error: InvalidRefError => abort(ConfigError(msg"The configuration contained a nonexistent reference"))
case SystemPropertyError(property) => abort(ConfigError(msg"The JVM system property $property could not be read."))
case IoError(path) => abort(ConfigError(msg"An I/O error occurred while trying to access $path"))
Expand Down
8 changes: 4 additions & 4 deletions src/model/model.scala
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,8 @@ object Workspace:
given (WorkspaceError fixes NumberError) =
case NumberError(text, _) => WorkspaceError(WorkspaceError.Reason.BadData(text))
given (WorkspaceError fixes UndecodableCharError) =
case UndecodableCharError(_, _) => WorkspaceError(WorkspaceError.Reason.BadContent)
given (WorkspaceError fixes CharDecodeError) =
case CharDecodeError(_, _) => WorkspaceError(WorkspaceError.Reason.BadContent)
*/

tend:
Expand All @@ -456,7 +456,7 @@ object Workspace:
//case InvalidRefError(text, _) => abort(WorkspaceError(WorkspaceError.Reason.BadData(text)))
//case RefError(text) => abort(WorkspaceError(WorkspaceError.Reason.BadData(text)))
//case NumberError(text, _) => abort(WorkspaceError(WorkspaceError.Reason.BadData(text)))
case UndecodableCharError(_, _) => abort(WorkspaceError(WorkspaceError.Reason.BadContent))
case CharDecodeError(_, _) => abort(WorkspaceError(WorkspaceError.Reason.BadContent))

/*
val build: Build = Codl.read[Build](buildFile)
Expand Down Expand Up @@ -488,4 +488,4 @@ object WorkspaceError:
case Reason.BadData(text) => msg"the value $text was not in the correct format"

case class WorkspaceError(reason: WorkspaceError.Reason)
extends Error(msg"the workspace could not be read because $reason")
extends Error(msg"the workspace could not be read because $reason")

0 comments on commit bbdecfd

Please sign in to comment.