[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnulib-tool-py] func_warning
From: |
Bruno Haible |
Subject: |
Re: [gnulib-tool-py] func_warning |
Date: |
Fri, 13 Jul 2012 10:44:45 +0200 |
User-agent: |
KMail/4.7.4 (Linux/3.1.10-1.9-desktop; KDE/4.7.4; x86_64; ; ) |
Hi Dmitriy,
> I'm now working with licence code, and I've found that we have to warn
> user if module doesn't have licence. In gnulib-tool we use echo +redirection
> to stderr, so I think we could just use sys.stderr.write(message), but
> I can create a class like GLError if you think that it fits better.
> What do you think?
You are not talking about
func_fatal_error "incompatible license on
modules:$nl$license_incompatibilities"
right? This one is a fatal error (albeit with a long explanation) and
should be handled by GLError.
You mean a warning such as
func_warning "module $1 lacks a License"
The idea of 'func_warning' is that we have a central place where we can
control the formatting and processing of such warnings. For example, we
might want to count the number of warnings and show it at the end. Or,
introduce an option -Werror like gcc has, that turns causes the script
to fail at the end if there was only one warning.
Whether it's done through a method in class GLError, or through a different
class GLWarning, I don't mind. Your choice.
Bruno