Re: [gDesklets] !!Please test!!


Christian Meyer wrote:
in bzr there's now nice and fixed code. I welcome everyone to test it. Next
things which have to be done is Humpel's new stuff.
I also need some help/advice: some desklet authors write crappy (svg) code.
When there's a timer things like this happen:

Error: Desklet contains errors. Please contact the author!

I improved the error messages quite a bit. If they shouldn't appear on every
(svg) update, I have to remember that the particular error's already
occurred. I could remember it in a boolean variable in TargetPlotter. But I
think that's not the best solution.

What do you guys think?

Would it be possible to get more output in the error message, like a line number or a bit of context?

If the error message becomes more elaborate (telling the line number, etc.) you could construct a hash out of it without the time information, put it in a list and then just test before calling print:

if hash_of_error_msg not in list_of_printed_msgs:
    print error_msg

Hashing of course takes some computational power, but we shouldn't be expecting a lot of error messages to begin with :D

  > lauri(AT) <
  > +35840 722 5101      <

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]