From: Joel VanderWerf Date: 2004-02-20T17:22:48+09:00 Subject: Re: how to raise warning? Hal Fulton wrote: ... > The problem as I see it is that we use warnings in two ways: > 1. As Ruby does, to complain about something happening at a specific > place in the source -- a highly source-related message. In that > case, I'd want to see file/line info (as Ruby does when it says I > need to add parens or something). > 2. To complain about some general condition occurring at runtime that > doesn't warrant bailing out of the app. > > My suggestion: Two names. Call the first one "warning" (the kind of > warning that Ruby gives us) and the second one "warn" (a simple verb > that just prints to stderr). If we were talking about exceptions, the distinction between 1 and 2 would be the distinction between ScriptError and StandardError. Maybe there should be Warning classes, analogous with Exception classes? This would give us the flexibility of saying which Warning classes we want to be reported ("ruby --ignore-warning=ScriptWarning").