uh_parser/RaptorError.pm
changeset 230 c01247054e72
parent 228 ba90e30c0f3c
child 231 914d8060176c
equal deleted inserted replaced
229:6669177dab54 230:c01247054e72
    49 my $CATEGORY_RAPTORERROR_TOOLDIDNOTRETURNVERSION = 'tool_didnot_return_version';
    49 my $CATEGORY_RAPTORERROR_TOOLDIDNOTRETURNVERSION = 'tool_didnot_return_version';
    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_MISSINGBLDINFFILE = 'missing_bld_inf_file';
    53 my $CATEGORY_RAPTORERROR_MISSINGBLDINFFILE = 'missing_bld_inf_file';
       
    54 my $CATEGORY_RAPTORERROR_FAILEDTOPARSEXMLFILE = 'failed_to_parse_xml_file';
    54 
    55 
    55 sub process
    56 sub process
    56 {
    57 {
    57 	my ($text, $logfile, $component, $mmp, $phase, $recipe, $file) = @_;
    58 	my ($text, $logfile, $component, $mmp, $phase, $recipe, $file) = @_;
    58 	
    59 	
   100 	}
   101 	}
   101 	elsif ($text =~ m,No build configurations given,)
   102 	elsif ($text =~ m,No build configurations given,)
   102 	{
   103 	{
   103 		$severity = $RaptorCommon::SEVERITY_CRITICAL;
   104 		$severity = $RaptorCommon::SEVERITY_CRITICAL;
   104 		$subcategory = $CATEGORY_RAPTORERROR_NOBUILDCONFIGSGIVEN;
   105 		$subcategory = $CATEGORY_RAPTORERROR_NOBUILDCONFIGSGIVEN;
       
   106 		RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file);
       
   107 	}
       
   108 	elsif ($text =~ m,Failed to parse XML file,)
       
   109 	{
       
   110 		$severity = $RaptorCommon::SEVERITY_CRITICAL;
       
   111 		$subcategory = $CATEGORY_RAPTORERROR_FAILEDTOPARSEXMLFILE;
   105 		RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file);
   112 		RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file);
   106 	}
   113 	}
   107 	elsif ($text =~ m,Could not export .* to .* : \[Errno 2\] No such file or directory: .*,)
   114 	elsif ($text =~ m,Could not export .* to .* : \[Errno 2\] No such file or directory: .*,)
   108 	{
   115 	{
   109 		$severity = $RaptorCommon::SEVERITY_MAJOR;
   116 		$severity = $RaptorCommon::SEVERITY_MAJOR;