From 89d5f385b4772ba3c795b8e7bf52272c1aecfd30 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Christophe=20Beaupr=C3=A9?= Date: Mon, 4 Jul 2016 10:13:31 -0400 Subject: [PATCH 1/1] model: Write errors to stderr MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jean-Christophe Beaupré --- src/model/model.nit | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/model/model.nit b/src/model/model.nit index 4060db6..19cd205 100644 --- a/src/model/model.nit +++ b/src/model/model.nit @@ -301,14 +301,14 @@ redef class MModule cladef.add_in_hierarchy return c end - print("Fatal Error: no primitive class {name} in {self}") + print_error("Fatal Error: no primitive class {name} in {self}") exit(1) abort end if cla.length != 1 then var msg = "Fatal Error: more than one primitive class {name} in {self}:" for c in cla do msg += " {c.full_name}" - print msg + print_error msg #exit(1) end return cla.first @@ -327,7 +327,7 @@ redef class MModule if res == null then res = mprop else if res != mprop then - print("Fatal Error: ambigous property name '{name}'; conflict between {mprop.full_name} and {res.full_name}") + print_error("Fatal Error: ambigous property name '{name}'; conflict between {mprop.full_name} and {res.full_name}") abort end end @@ -836,7 +836,7 @@ abstract class MType return true end - assert sub isa MClassType else print "{sub}