Skip to content

Curiosity Killed The Cat…Dunno What It's Doing To Me!

Over on Code To Joy there is a nice discussion of JFugue, the Java API for Music Programming and Groovy.

The comment was made:

… I wonder what a stack trace sounds like ;-)

I wondered too!

The answer was…boring!

A bit of munging made it just a bit less boring:

import org.jfugue.*

def munge(s) {
  (s.findAll { it ==~ /[A-Ga-g]/ } as Set).join(' ')
}

Exception.metaClass.play = { new Player().play(new Pattern(munge(delegate.toString()))) }

new IllegalArgumentException(/Don't give me that!/).play()
new ArrayIndexOutOfBoundsException(/Don't give me that!/).play()

There’s also Ode to Build Scripts!

As my dear departed mother always said: little things please little minds

Tags: ,

C, Java Enterprise Edition, JEE, J2EE, JBoss, Application Server, Glassfish, JavaServer Pages, JSP, Tag Libraries, Servlets, Enterprise Java Beans, EJB, Java Messaging Service JMS, BEA Weblogic, JBoss, Application Servers, Spring Framework, Groovy, Grails, Griffon, GPars, GAnt, Spock, Gradle, Seam, Open Source, Service Oriented Architectures, SOA, Java 2 Standard Edition, J2SE, Eclipse, Intellij, Oracle Service Bus, OSB