uh_parser/RaptorError.pm
changeset 185 978ef35b4e5f
parent 181 314156ec7d7c
child 186 b76adfbc6648
equal deleted inserted replaced
184:38468523076d 185:978ef35b4e5f
    46 my $CATEGORY_RAPTORERROR_CANTFINDMMPFILE = 'cant_find_mmp_file';
    46 my $CATEGORY_RAPTORERROR_CANTFINDMMPFILE = 'cant_find_mmp_file';
    47 my $CATEGORY_RAPTORERROR_MAKEEXITEDWITHERRORS = 'make_exited_with_errors';
    47 my $CATEGORY_RAPTORERROR_MAKEEXITEDWITHERRORS = 'make_exited_with_errors';
    48 my $CATEGORY_RAPTORERROR_TOOLDIDNOTRETURNVERSION = 'tool_didnot_return_version';
    48 my $CATEGORY_RAPTORERROR_TOOLDIDNOTRETURNVERSION = 'tool_didnot_return_version';
    49 my $CATEGORY_RAPTORERROR_UNKNOWNBUILDCONFIG = 'unknown_build_config';
    49 my $CATEGORY_RAPTORERROR_UNKNOWNBUILDCONFIG = 'unknown_build_config';
    50 my $CATEGORY_RAPTORERROR_NOBUILDCONFIGSGIVEN = 'no_build_configs_given';
    50 my $CATEGORY_RAPTORERROR_NOBUILDCONFIGSGIVEN = 'no_build_configs_given';
       
    51 my $CATEGORY_RAPTORERROR_COULDNOTEXPORT = 'missing_source_file';
       
    52 my $CATEGORY_RAPTORERROR_MISSINGBLDINFFILE = 'missing_bld_inf_file';
    51 
    53 
    52 sub process
    54 sub process
    53 {
    55 {
    54 	my ($text, $logfile, $component, $mmp, $phase, $recipe, $file, $line) = @_;
    56 	my ($text, $logfile, $component, $mmp, $phase, $recipe, $file, $line) = @_;
    55 	
    57 	
    96 	elsif ($text =~ m,No build configurations given,)
    98 	elsif ($text =~ m,No build configurations given,)
    97 	{
    99 	{
    98 		$severity = $RaptorCommon::SEVERITY_CRITICAL;
   100 		$severity = $RaptorCommon::SEVERITY_CRITICAL;
    99 		$subcategory = $CATEGORY_RAPTORERROR_NOBUILDCONFIGSGIVEN;
   101 		$subcategory = $CATEGORY_RAPTORERROR_NOBUILDCONFIGSGIVEN;
   100 		RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line);
   102 		RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line);
       
   103 	}
       
   104 	elsif ($text =~ m,Could not export .* to .* : \[Errno 2\] No such file or directory: .*,)
       
   105 	{
       
   106 		$severity = $RaptorCommon::SEVERITY_MAJOR;
       
   107 		$subcategory = $CATEGORY_RAPTORERROR_COULDNOTEXPORT;
       
   108 		RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line);
       
   109 	}
       
   110 	elsif ($text =~ m,win32/mingw/bin/cpp\.exe: .*bld\.inf:.*bld\.inf: No such file or directory,)
       
   111 	{
       
   112 		$severity = $RaptorCommon::SEVERITY_MAJOR;
       
   113 		$subcategory = $CATEGORY_RAPTORERROR_MISSINGBLDINFFILE;
       
   114 		RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line);
       
   115 	}
       
   116 	elsif ($text =~ m,^Preprocessor exception: ''Errors in .*bld\.inf'' : in command,)
       
   117 	{
       
   118 		# don't dump
       
   119 	}
       
   120 	elsif ($text =~ m,Source of export does not exist: .*,)
       
   121 	{
       
   122 		# don't dump
   101 	}
   123 	}
   102 	else # log everything by default
   124 	else # log everything by default
   103 	{
   125 	{
   104 		RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line);
   126 		RaptorCommon::dump_fault($category, $subcategory, $severity, $logfile, $component, $mmp, $phase, $recipe, $file, $line);
   105 	}
   127 	}