uh_parser/RaptorError.pm
changeset 216 907120563fce
parent 214 cf1d34408de3
child 217 8a3d46cfe8b5
equal deleted inserted replaced
215:74890d706f0c 216:907120563fce
    50 my $CATEGORY_RAPTORERROR_UNKNOWNBUILDCONFIG = 'unknown_build_config';
    50 my $CATEGORY_RAPTORERROR_UNKNOWNBUILDCONFIG = 'unknown_build_config';
    51 my $CATEGORY_RAPTORERROR_NOBUILDCONFIGSGIVEN = 'no_build_configs_given';
    51 my $CATEGORY_RAPTORERROR_NOBUILDCONFIGSGIVEN = 'no_build_configs_given';
    52 my $CATEGORY_RAPTORERROR_COULDNOTEXPORT = 'missing_source_file';
    52 my $CATEGORY_RAPTORERROR_COULDNOTEXPORT = 'missing_source_file';
    53 my $CATEGORY_RAPTORERROR_CPPEXENOSUCHFILEORDIRECTORY = 'cpp_exe_no_such_file_or_directory';
    53 my $CATEGORY_RAPTORERROR_CPPEXENOSUCHFILEORDIRECTORY = 'cpp_exe_no_such_file_or_directory';
    54 my $CATEGORY_RAPTORERROR_FAILEDTOPARSEXMLFILE = 'failed_to_parse_xml_file';
    54 my $CATEGORY_RAPTORERROR_FAILEDTOPARSEXMLFILE = 'failed_to_parse_xml_file';
       
    55 my $CATEGORY_RAPTORERROR_VARIANTFILEDOESNOTEXIST = 'variant_file_does_not_exist';
    55 
    56 
    56 sub process
    57 sub process
    57 {
    58 {
    58 	my ($text, $logfile, $component, $mmp, $phase, $recipe, $file) = @_;
    59 	my ($text, $logfile, $component, $mmp, $phase, $recipe, $file) = @_;
    59 	
    60 	
   107 	}
   108 	}
   108 	elsif ($text =~ m,Failed to parse XML file,)
   109 	elsif ($text =~ m,Failed to parse XML file,)
   109 	{
   110 	{
   110 		$severity = $RaptorCommon::SEVERITY_CRITICAL;
   111 		$severity = $RaptorCommon::SEVERITY_CRITICAL;
   111 		$subcategory = $CATEGORY_RAPTORERROR_FAILEDTOPARSEXMLFILE;
   112 		$subcategory = $CATEGORY_RAPTORERROR_FAILEDTOPARSEXMLFILE;
       
   113 		RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file);
       
   114 	}
       
   115 	elsif ($text =~ m,Variant file .* does not exist,)
       
   116 	{
       
   117 		$severity = $RaptorCommon::SEVERITY_CRITICAL;
       
   118 		$subcategory = $CATEGORY_RAPTORERROR_VARIANTFILEDOESNOTEXIST;
   112 		RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file);
   119 		RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file);
   113 	}
   120 	}
   114 	elsif ($text =~ m,Could not export .* to .* : \[Errno 2\] No such file or directory: .*,)
   121 	elsif ($text =~ m,Could not export .* to .* : \[Errno 2\] No such file or directory: .*,)
   115 	{
   122 	{
   116 		$severity = $RaptorCommon::SEVERITY_MAJOR;
   123 		$severity = $RaptorCommon::SEVERITY_MAJOR;