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

August 2025

S M T W T F S
      12
3456789
10 11 12 13141516
171819 20212223
24252627282930
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 25th, 2025 06:35 am
Powered by Dreamwidth Studios