GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

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  1816e45af867d5fd0b8dfea89fd5a81b92af585a
tree    2a452678d9c40ac51353f64029fba1be920f0d06
parent  43c036770f93916afdc8acd83725d89e6018802d
...
123
124
125
126
127
128
129
 
 
 
 
 
 
 
 
130
131
132
...
123
124
125
 
 
 
 
126
127
128
129
130
131
132
133
134
135
136
0
@@ -123,10 +123,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.