-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ball and Chain: toSingleBox now sets up the failure chain properly. #1609
Conversation
The ParamFailure that toSingleBox returns when there are Failures in the list now has a chain of Failures on it that correspond to all of the Failures in the list.
Hmmm. So, I'm going to be honest. I'm not in love with this. Mostly because I always understood the semantic meaning of the Do you see what I mean? One possible iteration from this point is to have the topmost |
I do see what you mean, but I don't think it's a problem. I'll think about it some more. Making the param the list of failures isn't terrible, but if another failure in turn is wrapped around the param, you lose the original list and that means you've lost information about what you were trying to do. Not the end of the world, but if we can represent both I think it's a win. |
So yeah, I've thought about this some more. It's not the cleanest possible implementation, I agree, but using the param in a |
< headscratch > Yeah, I see what you mean. Do you think a subclass of case class CompositeFailure[T](message: String, failures: List[Failure], param: T) extends ParamFailure[T] The question here is, I guess, "Do we gain any API niceness by adding to the class hierarchy?" |
It occurs to me though that we're at the point where this conversation might should be happening on the ML... |
Yeah, you're probably right. |
Sent a summary to the list. |
🎊 |
We didn't really reach a conclusion on this on the mailing list. Thoughts on what to do next? Shall I revive the thread? |
Yeah, let's revive the thread. If nobody else objects I'm fine with including it. My objection is primarily over semantic meaning, and it's probably nitpicking for perfection in an imperfect situation. ;) |
No further feedback was had, so I guess let's do it? |
I'm down. |
Ball and Chain: toSingleBox now sets up the failure chain properly.
The
ParamFailure
thattoSingleBox
returns when there areFailure
s in the listnow has a chain of
Failure
s on it that correspond to all of theFailure
s in thelist.