From: Jean-Christophe Beaupré Date: Mon, 4 Jul 2016 14:13:31 +0000 (-0400) Subject: model: Write errors to stderr X-Git-Url: http://nitlanguage.org model: Write errors to stderr Signed-off-by: Jean-Christophe Beaupré --- 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}