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

November 2025

S M T W T F S
       1
2345678
9101112131415
16171819202122
23242526272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Nov. 1st, 2025 02:23 pm
Powered by Dreamwidth Studios