Changeset 10740
- Timestamp:
- 08/07/08 12:36:31 (1 year ago)
- Files:
-
- branches/1.1/lib/yaml/sfYamlParser.class.php (modified) (5 diffs)
- branches/1.2/lib/yaml/sfYamlParser.class.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/yaml/sfYamlParser.class.php
r8869 r10740 64 64 if (preg_match('#^\t+#', $this->currentLine)) 65 65 { 66 throw new InvalidArgumentException(sprintf('A YAML file cannot contain tabs as indentation at line %d (%s).', $this->getRealCurrentLineNb() , $this->currentLine));66 throw new InvalidArgumentException(sprintf('A YAML file cannot contain tabs as indentation at line %d (%s).', $this->getRealCurrentLineNb() + 1, $this->currentLine)); 67 67 } 68 68 … … 107 107 if (!array_key_exists($isInPlace, $this->refs)) 108 108 { 109 throw new InvalidArgumentException(sprintf('Reference "%s" does not exist on line %s.', $isInPlace, $this->currentLine));109 throw new InvalidArgumentException(sprintf('Reference "%s" does not exist at line %s (%s).', $isInPlace, $this->getRealCurrentLineNb() + 1, $this->currentLine)); 110 110 } 111 111 } 112 112 else 113 113 { 114 throw new InvalidArgumentException(sprintf('In place substitution must point to a reference on line %s.', $this->currentLine));114 throw new InvalidArgumentException(sprintf('In place substitution must point to a reference at line %s (%s).', $this->getRealCurrentLineNb() + 1, $this->currentLine)); 115 115 } 116 116 } … … 157 157 } 158 158 159 throw new InvalidArgumentException(sprintf('Unable to parse line %d (%s).', $this->getRealCurrentLineNb() , $this->currentLine));159 throw new InvalidArgumentException(sprintf('Unable to parse line %d (%s).', $this->getRealCurrentLineNb() + 1, $this->currentLine)); 160 160 } 161 161 … … 202 202 if (!$this->isCurrentLineEmpty() && 0 == $newIndent) 203 203 { 204 throw new InvalidArgumentException(sprintf('Indentation problem at line %d (%s)', $this->getRealCurrentLineNb() , $this->currentLine));204 throw new InvalidArgumentException(sprintf('Indentation problem at line %d (%s)', $this->getRealCurrentLineNb() + 1, $this->currentLine)); 205 205 } 206 206 … … 238 238 else 239 239 { 240 throw new InvalidArgumentException(sprintf('Indentation problem at line %d (%s)', $this->getRealCurrentLineNb() , $this->currentLine));240 throw new InvalidArgumentException(sprintf('Indentation problem at line %d (%s)', $this->getRealCurrentLineNb() + 1, $this->currentLine)); 241 241 } 242 242 } branches/1.2/lib/yaml/sfYamlParser.class.php
r8869 r10740 64 64 if (preg_match('#^\t+#', $this->currentLine)) 65 65 { 66 throw new InvalidArgumentException(sprintf('A YAML file cannot contain tabs as indentation at line %d (%s).', $this->getRealCurrentLineNb() , $this->currentLine));66 throw new InvalidArgumentException(sprintf('A YAML file cannot contain tabs as indentation at line %d (%s).', $this->getRealCurrentLineNb() + 1, $this->currentLine)); 67 67 } 68 68 … … 107 107 if (!array_key_exists($isInPlace, $this->refs)) 108 108 { 109 throw new InvalidArgumentException(sprintf('Reference "%s" does not exist on line %s.', $isInPlace, $this->currentLine));109 throw new InvalidArgumentException(sprintf('Reference "%s" does not exist at line %s (%s).', $isInPlace, $this->getRealCurrentLineNb() + 1, $this->currentLine)); 110 110 } 111 111 } 112 112 else 113 113 { 114 throw new InvalidArgumentException(sprintf('In place substitution must point to a reference on line %s.', $this->currentLine));114 throw new InvalidArgumentException(sprintf('In place substitution must point to a reference at line %s (%s).', $this->getRealCurrentLineNb() + 1, $this->currentLine)); 115 115 } 116 116 } … … 157 157 } 158 158 159 throw new InvalidArgumentException(sprintf('Unable to parse line %d (%s).', $this->getRealCurrentLineNb() , $this->currentLine));159 throw new InvalidArgumentException(sprintf('Unable to parse line %d (%s).', $this->getRealCurrentLineNb() + 1, $this->currentLine)); 160 160 } 161 161 … … 202 202 if (!$this->isCurrentLineEmpty() && 0 == $newIndent) 203 203 { 204 throw new InvalidArgumentException(sprintf('Indentation problem at line %d (%s)', $this->getRealCurrentLineNb() , $this->currentLine));204 throw new InvalidArgumentException(sprintf('Indentation problem at line %d (%s)', $this->getRealCurrentLineNb() + 1, $this->currentLine)); 205 205 } 206 206 … … 238 238 else 239 239 { 240 throw new InvalidArgumentException(sprintf('Indentation problem at line %d (%s)', $this->getRealCurrentLineNb() , $this->currentLine));240 throw new InvalidArgumentException(sprintf('Indentation problem at line %d (%s)', $this->getRealCurrentLineNb() + 1, $this->currentLine)); 241 241 } 242 242 }

