Changeset 21108 for lang/cplusplus

Show
Ignore:
Timestamp:
10/11/08 11:11:31 (3 months ago)
Author:
tokuhirom
Message:

better error message

Location:
lang/cplusplus/llv8call/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/cplusplus/llv8call/trunk/ext/fs/file.cc

    r20806 r21108  
    117117        return args.This(); 
    118118    } else { 
    119         return throw_stderr("open"); 
     119        std::string buf("Cannot open("); 
     120        buf += *str; 
     121        buf += ")"; 
     122        return throw_stderr(buf.c_str()); 
    120123    } 
    121124END 
  • lang/cplusplus/llv8call/trunk/t/050_fs/01_file.js

    r20788 r21108  
    11require('t/util.js'); 
    22 
    3 plan({tests : 28}); 
     3plan({tests : 29}); 
    44check_lib('org.coderepos.fs', 'File'); 
    55 
     
    9898})(); 
    9999 
     100(function () { 
     101    try { 
     102        new File("/tmp/unknown/file", 'r'); 
     103    } catch (e) { 
     104        like(e, /Cannot open\(\/tmp\/unknown\/file\)/, 'cannot open file error message'); 
     105    } 
     106})();