[sork] Patch for vacation forwards-driver (.forward-parser)

Espen Jürgensen espen at hhkol.dk
Wed May 5 00:33:20 PDT 2004


Citat Eric Rostetter <eric.rostetter at physics.utexas.edu>:

> > So my question is, if there is any general plan/idea on how to fix this?
> 
> I still not sure what "this" is so I have no general plan or idea on how
> to fix it.

OK, here is another attempt at explaining my problem. From the code in 
forwards.php:

  // Try to login with the username/password, no realm.
  $status = $_vfs->checkCredentials();
  if (is_a($status, 'PEAR_Error')) {
      $this->err_str = $status->getMessage();
      $this->err_str .= '  ' .  _("Check your username and password.");
      return false;
  }

One would think this would show an error message, right? Well, it doesn't show 
anything. Setting an error string is actually pretty useless.

Anyway, the parser, which I submitted in a patch recently, wants to do pretty 
much the same: It gets called, and on error it returns false with an error 
message. However, like the ftp call, no error gets shown.

Of course, if error messages are considered an annoyance, then I suppose that 
is all right? Then I will just leave it at that.

> What do you mean by "trigger an error" ?

Show an error message to the user.

> The code hasn't changed much from back when it was only called once, so I
> doubt it has anything to do it being called twice.

Yes, you are right, perhaps it has more to do with main.php ignoring errors 
from isEnabled. Anyway, I am sure you are more inside the inner workings of the 
module, and can better pinpoint the cause.

> Yes, and in doing so, you can "return an error value".  Not sure how that
> differs from "trigger an error" though.

Sorry for being unclear, I hope the above is more clear.

All I want to do is show a nice error message to the user. Should I do it? And 
if so, how do I do it?

Regards,
Espen


More information about the sork mailing list