Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 373
- Log:
Initial import of Radiant 0.9.1, which is now packaged as a gem. This is an
import of the tagged 0.9.1 source checked out from GitHub, which isn't quite
the same as the gem distribution - but it doesn't seem to be available in an
archived form and the installed gem already has modifications, so this is
the closest I can get.
- Author:
- rool
- Date:
- Mon Mar 21 13:40:05 +0000 2011
- Size:
- 1793 Bytes
1 | module Sass |
2 | # An exception class that keeps track of |
3 | # the line of the Sass template it was raised on |
4 | # and the Sass file that was being parsed (if applicable). |
5 | # |
6 | # All Sass errors are raised as {Sass::SyntaxError}s. |
7 | class SyntaxError < StandardError |
8 | # The line of the Sass template on which the error occurred. |
9 | # |
10 | # @return [Fixnum] |
11 | attr_accessor :sass_line |
12 | |
13 | # The name of the file that was being parsed when the exception was raised. |
14 | # This could be `nil` if no filename is available. |
15 | # |
16 | # @return [String] |
17 | attr_reader :sass_filename |
18 | |
19 | # @param msg [String] The error message |
20 | # @param lineno [Fixnum] See \{#sass\_line} |
21 | def initialize(msg, lineno = nil) |
22 | @message = msg |
23 | @sass_line = lineno |
24 | end |
25 | |
26 | # Add information about the filename and line on which the error was raised, |
27 | # and re-raises the exception. |
28 | # |
29 | # @param filename [String] See \{#sass\_filename} |
30 | # @param line [Fixnum] See \{#sass\_line} |
31 | # @raise [Sass::SyntaxError] self |
32 | def add_metadata(filename, line) |
33 | self.sass_line ||= line |
34 | add_backtrace_entry(filename) unless sass_filename |
35 | raise self |
36 | end |
37 | |
38 | # Adds a properly formatted entry to the exception's backtrace. |
39 | # |
40 | # @param filename [String] The file in which the error occurred, |
41 | # if applicable (defaults to "(sass)") |
42 | def add_backtrace_entry(filename) # :nodoc: |
43 | @sass_filename ||= filename |
44 | self.backtrace ||= [] |
45 | self.backtrace.unshift "#{@sass_filename || '(sass)'}:#{@sass_line}" |
46 | end |
47 | |
48 | # @return [String] The error message |
49 | def to_s |
50 | @message |
51 | end |
52 | end |
53 | |
54 | # The class for Sass errors that are raised due to invalid unit conversions |
55 | # in SassScript. |
56 | class UnitConversionError < SyntaxError; end |
57 | end |