RPM

Comment 2 for bug 635890

Revision history for this message
Jeff Johnson (n3npq) wrote :

> Fact is, there's rpmio/rpmruby.[ch] on HEAD. Fact is also, this one doesn't
> handle errors on the Ruby source code (%expand).

If you can enumerate the plain vanilla exceptions that ruby "expects",
that would help starting to devise a framework for throw/catch that
wraps every crossover from rpm <-> ruby.

Basically what is needed is to think of the embedded ruby interpreter
as an eval on steroids, and to wire up an exception handling
framework that never exits.

The other issue is one of design: macro expansions do don have any
well-defined error pathway except through expansion values.
.
All I'm saying is that the analogue of a macro expansion in shell is essentially
   ( run_some_command 2>&1 )
I'e an expansion is started and "errors" are handled in-band as if they were
the results of the expansion.

And (again analogous to the shell) what is needed is a trap call (i.e a
primitive form of exception handling).

SHort answer: Could you list the common ruby exceptions that need handling?