Added and used PublicationError exception class

darcs-hash:20090513150824-58103-afe8040b692920783cde368719c9332515ca2f0e