Enhancement #865

Error conditions during style creation should be wrapped in a suitable error condition

Added by J. Moringen about 12 years ago. Updated over 9 years ago.

Status:ResolvedStart date:02/08/2012
Priority:NormalDue date:
Assignee:J. Moringen% Done:

100%

Category:Common Lisp Tools
Target version:rsb-0.11

Description

Example:

$ ./bag-cat --style 'programmable/script :script #p"../scripts/export-pngs.lisp"' /vol/humavips/studies/Y2_Vernissage/corpus/slots/09/video.tide 
error opening #P"/homes/jmoringe/code/cl-rsbag-tools/trunk/build-x86_64/../scripts/export-pngs.lisp": No such file or directory

This should say something like:

Failed to create formatting style PROGRAMMABLE/SCRIPT with arguments
+ SCRIPT      -> #P"../scripts/export-pngs.lisp" 
Caused by:
> error opening
> #P"/homes/jmoringe/code/cl-rsbag-tools/trunk/build-x86_64/../scripts/export-pngs.lisp":
> No such file or directory

Associated revisions

Revision fb86fe60
Added by J. Moringen over 9 years ago

make-style signals style-creation-error in formatting/protocol.lisp

fixes #865

  • formatting/conditions.lisp (style-creation-error): new condition;
    signaled when creating a style instance fails
  • formatting/protocol.lisp (make-style): removed; replaced by generic
    function
    (make-style): new generic function; make and return a style instance
    according to the supplied specification
    (define-condition-translating-method make-style): new method;
    translate `error's into `style-creation-error's
    (make-style symbol): new method; handle symbols as specification
    (make-style cons): new method; similar for conses
    (make-style standard-object): new method; detects when a style is
    erroneously supplied in conjunction with arguments
  • formatting/package.lisp (package rsb.formatting): added exported
    symbols style-creation-error and style-creation-error-specification
  • test/formatting/protocol.lisp: new file; tests for protocol functions
    of the formatting module
  • cl-rsb-formatting.asd (system cl-rsb-formatting-test): added file
    test/formatting/protocol.lisp

History

#1 Updated by J. Moringen almost 12 years ago

  • Target version set to rsb-0.9

#2 Updated by J. Moringen almost 11 years ago

  • Target version changed from rsb-0.9 to rsb-0.10

#3 Updated by J. Moringen over 10 years ago

  • Target version changed from rsb-0.10 to rsb-0.11

#4 Updated by J. Moringen over 9 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF