Development

Changeset 8228

You must first sign up to be able to contribute.

Changeset 8228

Show
Ignore:
Timestamp:
04/03/08 13:30:30 (7 months ago)
Author:
pookey
Message:

catching and rethrowing parse errors caused by invalid YAML parsed by syck

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/yaml/sfYaml.class.php

    r8155 r8228  
    6161    if (function_exists('syck_load')) 
    6262    { 
    63       $retval = syck_load($input); 
     63      try 
     64      { 
     65        $retval = syck_load($input); 
     66      } 
     67      catch (Exception $e) 
     68      { 
     69        throw new InvalidArgumentException(sprintf('Syck failed to parse %s, error was: "%s"', $file ? sprintf('file "%s"', $file) : 'string', $e->getMessage())); 
     70      } 
    6471 
    6572      return is_array($retval) ? $retval : array();