Skip to content
This repository
Browse code

nicer error message of &evalfiles

  • Loading branch information...
commit aee97aacc8f9848ae55abb0090593677d786f4d3 1 parent d44ab2e
Filip Sergot authored February 26, 2012

Showing 1 changed file with 5 additions and 2 deletions. Show diff stats Hide diff stats

  1. 7  src/HLL/Compiler.pm
7  src/HLL/Compiler.pm
@@ -398,10 +398,13 @@ class HLL::Compiler {
398 398
                 pir::push(@codes, $in-handle.readall($_));
399 399
                 $in-handle.close;
400 400
                 CATCH {
401  
-                    $err := "Error while reading from file: $_";
  401
+                    $err := 1;
402 402
                 }
403 403
             }
404  
-            pir::die($err) if $err;
  404
+            if $err {
  405
+                say("Cannot open \"$_\".");
  406
+                pir::exit(1);
  407
+            }
405 408
         }
406 409
         my $code := pir::join('', @codes);
407 410
         my $?FILES := pir::join(' ', @files);

0 notes on commit aee97aa

Please sign in to comment.
Something went wrong with that request. Please try again.