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

September 2025

S M T W T F S
 1 2345 6
78 9 10 111213
14 151617 181920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Sep. 19th, 2025 12:03 am
Powered by Dreamwidth Studios