#179 new
bahuvrihi

Add JoinError

Reported by bahuvrihi | March 1st, 2009 @ 08:11 AM

When join enques or executes, check the arity of inputs vs target and raise a JoinError if there is an issue. Then wrap run so that JoinErrors are processed into a meaningful output (or simply make the join error meaningful... like by translating into a schema join and suggesting what may be necessary with isa).

Comments and changes to this ticket

  • bahuvrihi

    bahuvrihi March 5th, 2009 @ 05:11 PM

    This is actually trickier than it looks. It's not always straightforward to pick out the arity of the executable methods.

    
    executable.method(executable.method_name).arity
    

    Doesn't do it. Interned tasks will not be picked up correctly, nor will _method executables.

    Simply fishing for ArgumentErrors is also tricky... could do it in Executable, but you have to check to make sure the error is the result of a misjoin.

    
            rescue ArgumentError
              raise if previous.select {|_audit| _audit.key }.empty?
              raise JoinError(self, previous)
            end
    

    Moreover, you'd have to check to make sure the ArgumentError is coming from the call to the method and not something internal to process itself.

    May be best to fish for these top-level and try to detect... OR to begin implementing some annotation regarding what comes in and what goes out.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A framework for making configurable, file-based tasks and workflows.

People watching this ticket

Pages