mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
C#: Refactor extractor errors and log extractor errors to the database.
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Globalization;
|
||||
using System.Collections.Generic;
|
||||
using Semmle.Util.Logging;
|
||||
using System;
|
||||
using Semmle.Extraction.Entities;
|
||||
|
||||
namespace Semmle.Extraction.CIL.Entities
|
||||
{
|
||||
@@ -70,12 +71,7 @@ namespace Semmle.Extraction.CIL.Entities
|
||||
}
|
||||
catch (InternalError e)
|
||||
{
|
||||
cx.cx.Extractor.Message(new Message
|
||||
{
|
||||
exception = e,
|
||||
message = "Error processing type definition",
|
||||
severity = Semmle.Util.Logging.Severity.Error
|
||||
});
|
||||
cx.cx.ExtractionError("Error processing type definition", e.Message, GeneratedLocation.Create(cx.cx), e.StackTrace);
|
||||
}
|
||||
|
||||
// Limitation of C#: Cannot yield return inside a try-catch.
|
||||
@@ -92,12 +88,7 @@ namespace Semmle.Extraction.CIL.Entities
|
||||
}
|
||||
catch (InternalError e)
|
||||
{
|
||||
cx.cx.Extractor.Message(new Message
|
||||
{
|
||||
exception = e,
|
||||
message = "Error processing bytecode",
|
||||
severity = Semmle.Util.Logging.Severity.Error
|
||||
});
|
||||
cx.cx.ExtractionError("Error processing bytecode", e.Message, GeneratedLocation.Create(cx.cx), e.StackTrace);
|
||||
}
|
||||
|
||||
if (product != null)
|
||||
|
||||
Reference in New Issue
Block a user