Jan. 13th, 2012

juan_gandhi: (Default)
  protected def badLuck(text: String, details: String): Elem = badLuck(text, ("title", details))
  protected def ifHome(fun: => NodeSeq) = if (isHomeValid) fun 
           else badLuck("NEXUS_HOME NOT CONFIGURED", 
                        "Please go back to Boot Configuration page and set a valid NEXUS_HOME folder")


Now in the code you write like this:

ifHome {
  println("Honey, I'm home!!!")
  haveDinner
  watchTv
  // etc
}

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

December 2025

S M T W T F S
  1 2 3 4 56
7 89101112 13
14151617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Dec. 15th, 2025 04:32 am
Powered by Dreamwidth Studios