Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Change color of error message #233

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions main/src/io/github/iltotore/iron/macros/package.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.iltotore.iron.macros

import scala.Console.{CYAN, RESET}
import scala.Console.{MAGENTA, RESET}
import scala.quoted.*

/**
Expand Down Expand Up @@ -119,17 +119,17 @@ private def assertConditionImpl[A: Type](input: Expr[A], cond: Expr[Boolean], me
|
|To test a constraint at runtime, use one of the `refine...` extension methods.
|
|${CYAN}Inlined input$RESET: ${input.show}
|${CYAN}Inlined condition$RESET: ${cond.show}
|${CYAN}Message$RESET: $messageValue""".stripMargin
|${MAGENTA}Inlined input$RESET: ${input.show}
|${MAGENTA}Inlined condition$RESET: ${cond.show}
|${MAGENTA}Message$RESET: $messageValue""".stripMargin
)
)

if !condValue then
compileTimeError(s"""|Could not satisfy a constraint for type $CYAN${inputType.show}$RESET.
compileTimeError(s"""|Could not satisfy a constraint for type $MAGENTA${inputType.show}$RESET.
|
|${CYAN}Value$RESET: ${input.show}
|${CYAN}Message$RESET: $messageValue""".stripMargin)
|${MAGENTA}Value$RESET: ${input.show}
|${MAGENTA}Message$RESET: $messageValue""".stripMargin)
'{}

/**
Expand Down