All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.getquill.util.Messages.scala Maven / Gradle / Ivy

There is a newer version: 4.6.0
Show newest version
package io.getquill.util

import scala.reflect.macros.whitebox.Context

object Messages {

  def fail(msg: String) =
    throw new IllegalStateException(msg)

  implicit class RichContext(c: Context) {

    def error(msg: String) =
      c.error(c.enclosingPosition, msg)

    def fail(msg: String) =
      c.abort(c.enclosingPosition, msg)

    def warn(msg: String) =
      c.warning(c.enclosingPosition, msg)

    def info(msg: String) =
      c.info(c.enclosingPosition, msg, force = true)
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy