Skip to content

Commit

Permalink
Action sbt scalafmtAll
Browse files Browse the repository at this point in the history
  • Loading branch information
takapi327 committed Jan 1, 2025
1 parent 943bc75 commit 13566f6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ object ResultSetConsumer:
if resultSet.next() then
decoder.decode(resultSet, FIRST_OFFSET) match
case Right(value) => Monad[F].pure(Some(value))
case Left(error) => ev.raiseError(new DecodeFailureException(error.message, decoder.offset, statement, error.cause))
case Left(error) =>
ev.raiseError(new DecodeFailureException(error.message, decoder.offset, statement, error.cause))
else Monad[F].pure(None)

given [F[_]: Monad, T, G[_]](using
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class DecodeFailureException(
message: String,
offset: Int,
statement: String,
cause: Option[Throwable] = None
cause: Option[Throwable] = None
) extends LdbcException(
message,
cause.map(_ => s"""
Expand All @@ -23,7 +23,7 @@ class DecodeFailureException(
| ${ Console.GREEN + statement + Console.RESET }
|""".stripMargin),
cause.map(_ =>
s"""${ Console.CYAN }Try building a Decoder that matches the number and type of cases to be acquired as follows.
s"""${ Console.CYAN }Try building a Decoder that matches the number and type of cases to be acquired as follows.
|
| given Decoder[(Int, String)] = Decoder[Int] *: Decoder[String]
| ${ Console.RED + " " * 28 }^${ Console.RESET }${ Console.RED + " " * 8 }^${ Console.CYAN }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ class LdbcException(

protected def body: String =
s"""
|${ labeled(" Problem: ", message) }${ detail.map(str => "\n| Detail: " + str).getOrElse("") }${ hint.map(str => "\n| Hint: " + str).getOrElse("") }
|${ labeled(" Problem: ", message) }${ detail.map(str => "\n| Detail: " + str).getOrElse("") }${ hint
.map(str => "\n| Hint: " + str)
.getOrElse("") }
|""".stripMargin

protected def sections: List[String] =
Expand Down

0 comments on commit 13566f6

Please sign in to comment.