On Jan 30, 2009, at 2:53 PM, nathan binkert wrote:

>> We've talked for a while about needing better error messages, links,
>> more descriptions on the website, etc. How about we modify panic(),
>> fatal(), and warn() to hash the format string for the message and
>> print out a url with some portion of that hash.
>
> This is a pretty cool idea.
>
> The only realistic alternative is to give error codes to the various
> functions.  It's more work up front, but it means that we don't need
> to do anything if the actual message changes.  I'm sure a little perl
> magic could assign error codes to all instances of these calls in the
> source tree.  Of course, one would have to be careful not to duplicate
> the error codes.
Yea, and with distributed development this is also a bit of a pain as  
well. What happens if two people assign the same error code.


> I'd probably lean towards Ali's proposal due to its simplicity, but I
> think we'd need to run ispell on all of the messages to make sure that
> they're ok and I think we also need to find out how many duplicates we
> have because the same message is in multiple places.
Yes. I don't think we have many duplicates, at least not when the the  
messages are meaningful. panic("crap") isn't at all helpful.

>
>
> One final thing, is there a way to have a default page pop up to
> explain that the error message has not yet been written about and to
> give instructions?  Maybe URL rewriting can do that sort of thing too?
> Certainly if rewrite can run a snippet of python code or something
> else, it could.
I suggest putting the error messages in a different directory  (e.g.  
m5sim.org/e/<error id>). With this we could either re-write to the  
normal wiki, re-write to another wiki for errors where we had a custom  
not-found page, or re-write to some php/python that checked and did  
the appropriate thing. Either way not putting /wiki/index.php? 
<error_id> gives us many possibilities.

>
>
> While you're at it, I created an info() that is just like warn(),
> there are probably things that should be converted so people don't
> keep wondering about them.
Yea, I was thinking that too... Although I don't see info in the  
repository. Have you added it?

Ali

_______________________________________________
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to