public
Rubygem
Fork of nex3/haml
Description: HTML Abstraction Markup Language - A Markup Haiku
Homepage: http://haml.hamptoncatlin.com
Clone URL: git://github.com/chriseppstein/haml.git
get an error message, even if you can't read the file
chriseppstein (author)
Mon Jul 07 11:45:39 -0700 2008
commit  16cf16cb467c921fe1ee1c6212e4baa1ef7b0a51
tree    e4ce0c23934ce083e869cc6e0077bf268b92e2c9
parent  b882ab197dd7aa47b9599f2cef682ba85000e3b2
...
98
99
100
101
102
103
104
 
 
 
 
 
 
 
 
105
106
107
...
98
99
100
 
 
 
 
101
102
103
104
105
106
107
108
109
110
111
0
@@ -98,10 +98,14 @@ module Sass
0
                 e_string << "\n\n"
0
 
0
                 min = [e.sass_line - 5, 0].max
0
- File.read(e.sass_filename).rstrip.split("\n")[
0
- min .. e.sass_line + 5
0
- ].each_with_index do |line, i|
0
- e_string << "#{min + i + 1}: #{line}\n"
0
+ begin
0
+ File.read(e.sass_filename).rstrip.split("\n")[
0
+ min .. e.sass_line + 5
0
+ ].each_with_index do |line, i|
0
+ e_string << "#{min + i + 1}: #{line}\n"
0
+ end
0
+ rescue
0
+ e_string << "Couldn't read sass file: #{e.sass_filename}"
0
                 end
0
               end
0
             end

Comments

    No one has commented yet.