mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Add some Sentry transactions.
This commit is contained in:
@@ -48,6 +48,8 @@ public static class ImageFormat
|
||||
/// <returns>Detected image plugin</returns>
|
||||
public static IBaseImage Detect(IFilter imageFilter)
|
||||
{
|
||||
ITransactionTracer transaction = SentrySdk.StartTransaction("GetPlugin", "DetectImageFormat");
|
||||
|
||||
try
|
||||
{
|
||||
PluginRegister plugins = PluginRegister.Singleton;
|
||||
@@ -102,7 +104,12 @@ public static class ImageFormat
|
||||
}
|
||||
}
|
||||
|
||||
if(imageFormat != null) return imageFormat;
|
||||
if(imageFormat != null)
|
||||
{
|
||||
transaction.Finish();
|
||||
|
||||
return imageFormat;
|
||||
}
|
||||
|
||||
// Check only RAW plugin
|
||||
foreach(IMediaImage imagePlugin in plugins.MediaImages.Values)
|
||||
@@ -128,12 +135,16 @@ public static class ImageFormat
|
||||
}
|
||||
|
||||
// Still not recognized
|
||||
transaction.Finish();
|
||||
|
||||
return imageFormat;
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
SentrySdk.CaptureException(ex);
|
||||
|
||||
transaction.Finish();
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user