Browse Source

new error handling

Namdak Tonpa 9 years ago
parent
commit
1162ab217d
3 changed files with 6 additions and 6 deletions
  1. 1 1
      include/mad.hrl
  2. BIN
      mad
  3. 5 5
      src/compile/mad_erl.erl

+ 1 - 1
include/mad.hrl

@@ -1 +1 @@
--define(VERSION,"1c37d2").
+-define(VERSION,"9aaa95").

BIN
mad


+ 5 - 5
src/compile/mad_erl.erl

@@ -15,9 +15,9 @@ compile(File,Inc,Bin,Opt,Deps) ->
     true -> false end.
 
 ret(error) -> true;
-ret({error,Errors,Warnings}) ->
+ret({error,Errors,_}) ->
     [ [ mad:info("Line ~p: ~p~n",[Line,R]) || {Line,_,R} <- Reports]
-      || {File,Reports} <- Errors ], true;
-ret({ok,X}) -> false;
-ret({ok,X,Y}) -> false;
-ret({ok,X,Y,Z}) -> false.
+      || {_,Reports} <- Errors ], true;
+ret({ok,_}) -> false;
+ret({ok,_,_}) -> false;
+ret({ok,_,_,_}) -> false.