trans-coord-devel
[Top][All Lists]
Advanced

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

Re: Error handling


From: Yavor Doganov
Subject: Re: Error handling
Date: Thu, 28 Feb 2008 14:22:20 +0200

On ср, 2008-02-20 at 17:07 +0200, Yavor Doganov wrote:
> On вт, 2008-02-12 at 23:35 +0200, Yavor Doganov wrote:
> > a) Error handling.  There are several types of errors, and I want all
> > of them to be mailed to the relevant parties (i.e. the presumably
> > "guilty" parties).

Next step: errors from make-prototype.  This should be straightforward;
suggestions for the variable name and the subject welcome.
--- GNUmakefile 28 фев 2008 13:49:14 +0200      1.3
+++ GNUmakefile 28 фев 2008 14:18:19 +0200      
@@ -132,6 +132,12 @@
 $(VALIDATESKIP) $(MSGFMT) --check --verbose --output-file=/dev/null $$@
 endef
 
+# The command to mail errors from make-prototype.
+define prototype-error
+./mailfail $(NOTIFYSKIP) $(web_addr),$(devel_addr) \
+  "[GNUN Error] Incompatible change in $(subst $(rootdir),,$<)"
+endef
+
 # Ensure that generic.LANG.html is always present for the homepage and
 # articles' generation.
 
@@ -190,7 +196,8 @@
 # extra safety, exit with an error so that make does not
 # proceed to the next command.
        $(VALIDATESKIP) $(VALIDATE-HTML-NOTIFY) $(NOTIFYSKIP) $(web_addr) $<
-       $(MAKE-PROTOTYPE) --home --input=$< --generic=generic.html --output=$@ 
|| ($(RM) $@ ; exit 1)
+       $(prototype-error) $(MAKE-PROTOTYPE) --home --input=$< \
+         --generic=generic.html --output=$@ || ($(RM) $@ ; exit 1)
        $(SED) --in-place "s/\$$Date.*\$$/<gnun>\0<\/gnun>/g" $@
 
 $(rootdir)/po/home.pot: $(rootdir)/po/home.proto
@@ -239,8 +246,10 @@
 define article_pot_rules
 $(1).proto $(1).translinks: $(subst /po/,/,$(1).html)
        $(VALIDATESKIP) $(VALIDATE-HTML-NOTIFY) $(NOTIFYSKIP) $(transl_addr) $$<
-       $(MAKE-PROTOTYPE) --input=$$< --generic=generic.html 
--output=$(1).proto --translinks=$(1).translinks || \
-         ($(RM) $(1).proto $(1).translinks ; exit 1)
+       $$(prototype-error) $(MAKE-PROTOTYPE) --input=$$< \
+         --generic=generic.html --output=$(1).proto \
+         --translinks=$(1).translinks \
+           || ($(RM) $(1).proto $(1).translinks ; exit 1)
        $(SED) --in-place "s/\$$$$Date.*\$$$$/<gnun>\0<\/gnun>/g" $(1).proto
 
 $(1).pot: $(1).proto

reply via email to

[Prev in Thread] Current Thread [Next in Thread]