daisy / pipeline

Super-project that aggregates all Pipeline related code, provides a common tracker for Pipeline related issues and holds the Pipeline website
http://daisy.github.io/pipeline
20 stars 20 forks source link

Non-critical error codes #419

Open rom1mouret opened 10 years ago

rom1mouret commented 10 years ago

Using the methods of XProcMessageListener, error codes can be associated with error messages. Is there any way to associate codes with warning messages as well?

I'd rather not concatenate messages with codes because it wouldn't allow us to customize the client's output format. error() is not suitable for non-critical errors as it stops the current job.

capitancambio commented 10 years ago

Right now there is no way as we rely on calabash's messaging system. Even our message step is based on it (https://github.com/daisy/pipeline-framework/blob/master/calabash-custom-steps/src/main/java/org/daisy/common/xproc/calabash/steps/impl/MessageProvider.java).

At some point in the past we discussed about adding an extra communication tool in the pipeline using custom steps, but for some reason it never got it into the requirements (probably lack of time)

On the other hand, you can always use expressive grepable warnings, if what you want to achieve is an easy way to locate the piece of code that triggered that event.

rom1mouret commented 10 years ago

Yes, indeed, I want to easily grep some warnings, depending on their type.

My use case is the following:

All of the TTS errors fall into one of these three categories:

The ruby client is wrapped into a shell script that runs the conversion until the result is good enough. But the errors are rather varied and I frequently add new ones, so the shell script can't grep them individually to decide whether the conversion should be run again.

I'll prefix the warnings with string-based error codes for now.