Permalink
Browse files

Bail early when things fail

  • Loading branch information...
1 parent 520db6b commit 5d64b8fb18d4fdf094bbc040cca20e72711fa008 @temas temas committed Mar 21, 2013
Showing with 5 additions and 0 deletions.
  1. +5 −0 scripts/ijoder.js
View
@@ -75,7 +75,12 @@ console.log("Table: " + table);
console.log("Query: " + query);
partition.readFrom(idr, function (parts) {
+ console.log(parts);
parts[0].dal.query(query, [], function (err, rows) {
+ if (err || rows.length == 0) {
+ console.log("IDR not found");
+ return;
+ }
backend.get(rows[0].path, rows[0].offset, rows[0].len, function (err, buf) {
var zbuf = zlib.uncompress(buf);

0 comments on commit 5d64b8f

Please sign in to comment.