[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] bug in monotone
From: |
Nathaniel Smith |
Subject: |
Re: [Monotone-devel] bug in monotone |
Date: |
Thu, 8 Jan 2009 21:12:23 -0800 |
On Thu, Jan 8, 2009 at 3:02 PM, Thomas Keller <address@hidden> wrote:
> We should try, right. Problem is that the invariant exists at two place
> (path_component::path_component(string const &d) and
> path_component::path_component(char const * d)) where the original error
> could either come from the inside (i.e. a roster) or the outside (i.e.
> the filesystem). To fix this one and for all time we could need
> something similar like what Timothy recently did with high-level data
> structures like revision: we'd need some kind of "origin" parameter.
> Yell with an invariant if the corrupt data come from the inside, because
> something broke, give the user a normal error when some external path is
> wrong.
The usual way we've handled this is to have the "outside" do the
checking with a nice error message, and then have the lower-level code
just I() on anything it can't handle (but never get called, if the
outside caught the problem first). That means when you're looking at
the lower level code, you just have to worry about ensuring
correctness, and not be distracted by also trying to diagnose the
exact source of any incorrectness.
-- Nathaniel
- [Monotone-devel] bug in monotone, Helmut Stiegler, 2009/01/08
- Re: [Monotone-devel] bug in monotone, Thomas Keller, 2009/01/08
- Re: [Monotone-devel] bug in monotone, Markus Wanner, 2009/01/08
- Re: [Monotone-devel] bug in monotone / January Mini Summit, Philipp Gröschler, 2009/01/08
- [Monotone-devel] Re: bug in monotone / January Mini Summit, Lapo Luchini, 2009/01/19
- Re: [Monotone-devel] Re: bug in monotone / January Mini Summit, Richard Levitte, 2009/01/19
- Re: [Monotone-devel] Re: bug in monotone / January Mini Summit, Philipp Gröschler, 2009/01/19
- Re: [Monotone-devel] bug in monotone / January Mini Summit, Lapo Luchini, 2009/01/19
- Re: [Monotone-devel] bug in monotone, Thomas Keller, 2009/01/08
- Re: [Monotone-devel] bug in monotone, Derek Scherger, 2009/01/08
- Re: [Monotone-devel] bug in monotone,
Nathaniel Smith <=
- Re: [Monotone-devel] bug in monotone, Helmut Stiegler, 2009/01/09
- Re: [Monotone-devel] bug in monotone, Thomas Keller, 2009/01/09