[chronojump] If ForceSensor or RaceAnalyzer export fails, it displays error message
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] If ForceSensor or RaceAnalyzer export fails, it displays error message
- Date: Thu, 11 Mar 2021 17:43:40 +0000 (UTC)
commit 33453cdb53c884418d30cb42b53eb9c380e192df
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Mar 11 18:42:30 2021 +0100
If ForceSensor or RaceAnalyzer export fails, it displays error message
src/exportFiles/exportFiles.cs | 4 ++++
src/exportFiles/fs.cs | 3 +++
src/exportFiles/re.cs | 3 +++
3 files changed, 10 insertions(+)
---
diff --git a/src/exportFiles/exportFiles.cs b/src/exportFiles/exportFiles.cs
index 03654179..8783e37c 100644
--- a/src/exportFiles/exportFiles.cs
+++ b/src/exportFiles/exportFiles.cs
@@ -41,6 +41,7 @@ public abstract class ExportFiles
protected static Thread thread;
protected static bool cancel;
+ protected static bool failedRprocess; //error on .R process
protected static bool noData;
protected static bool cannotCopy;
protected static string messageToProgressbar;
@@ -72,6 +73,7 @@ public abstract class ExportFiles
createOrEmptyDirs();
cancel = false;
+ failedRprocess = false;
noData = false;
cannotCopy = false;
progressbar.Fraction = 0;
@@ -146,6 +148,8 @@ public abstract class ExportFiles
labelResult.Text = Catalog.GetString("Cancelled.");
else if (noData)
labelResult.Text = Catalog.GetString("Missing data.");
+ else if (failedRprocess)
+ labelResult.Text = Catalog.GetString("Error doing operation.");
else if (cannotCopy)
labelResult.Text = string.Format(Catalog.GetString("Cannot copy to {0} "),
exportURL);
else
diff --git a/src/exportFiles/fs.cs b/src/exportFiles/fs.cs
index 649ae9b0..a3ea1bdb 100644
--- a/src/exportFiles/fs.cs
+++ b/src/exportFiles/fs.cs
@@ -339,7 +339,10 @@ public class ForceSensorExport : ExportFiles
);
if(! fsg.CallR(imageWidth, imageHeight, false))
+ {
+ failedRprocess = true;
return false;
+ }
}
LogB.Information("Waiting creation of file... ");
diff --git a/src/exportFiles/re.cs b/src/exportFiles/re.cs
index b52c0a64..0dc32a72 100644
--- a/src/exportFiles/re.cs
+++ b/src/exportFiles/re.cs
@@ -196,7 +196,10 @@ public class RunEncoderExport : ExportFiles
);
if(! reg.CallR(imageWidth, imageHeight, false))
+ {
+ failedRprocess = true;
return false;
+ }
}
LogB.Information("Waiting creation of file... ");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]