[niepce] fwk+rust: fix the err_out!() macro



commit c644c2834254e26506fd7cef0aea56dcebdd0df3
Author: Hubert Figuière <hub figuiere net>
Date:   Thu Sep 21 20:56:47 2017 -0400

    fwk+rust: fix the err_out!() macro

 src/engine/db/libfile.rs |    2 +-
 src/fwk/base/debug.rs    |    6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/engine/db/libfile.rs b/src/engine/db/libfile.rs
index 4b8c899..e1c7507 100644
--- a/src/engine/db/libfile.rs
+++ b/src/engine/db/libfile.rs
@@ -162,7 +162,7 @@ impl LibFile {
             Np::NpNiepceFlagProp =>
                 self.set_flag(value),
             _ =>
-                (),
+                err_out!("invalid property {:?} - noop", idx),
         };
     }
 
diff --git a/src/fwk/base/debug.rs b/src/fwk/base/debug.rs
index b9d6029..5e3fc22 100644
--- a/src/fwk/base/debug.rs
+++ b/src/fwk/base/debug.rs
@@ -10,8 +10,10 @@ macro_rules! dbg_out {
 #[macro_export]
 macro_rules! err_out {
     ( $( $x:expr ),* ) => {
-        print!("ERROR: ");
-        println!( $($x),* );
+        {
+            print!("ERROR: ");
+            println!( $($x),* );
+        }
     };
 }
 


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