Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormegumi.telles2018-03-23 16:41:59 +0000
committermegumi.telles2018-03-23 16:41:59 +0000
commit1987997c373b6d89a91bce25043542ac91b0b7ff (patch)
tree70c309c5ffe19271d8e55411991050f5e193763e
parent488684afb2b16596bc5e2c95905ccb9c9bb72974 (diff)
downloadorg.eclipse.osee-1987997c373b6d89a91bce25043542ac91b0b7ff.tar.gz
org.eclipse.osee-1987997c373b6d89a91bce25043542ac91b0b7ff.tar.xz
org.eclipse.osee-1987997c373b6d89a91bce25043542ac91b0b7ff.zip
refinement: Add logging to lis file parser
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java3
-rw-r--r--plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/VCastLisFileParser.java16
2 files changed, 13 insertions, 6 deletions
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java
index 71d80cb8bc8..520ffd67b26 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java
@@ -308,7 +308,8 @@ public class LisFileParser implements DispoImporterApi {
try {
lineData = lisFileParser.getSourceCodeForLine(functionNumber, lineNumber);
} catch (Exception ex) {
- report.addEntry("SQL", ex.getMessage(), ERROR);
+ report.addEntry("SQL",
+ String.format("Issue getting source code line [%s], [%s]", lisFile.getLISFile(), ex.getMessage()), ERROR);
}
String location = "";
if (lineData != null) {
diff --git a/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/VCastLisFileParser.java b/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/VCastLisFileParser.java
index a89d207d722..83e15a3d0cb 100644
--- a/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/VCastLisFileParser.java
+++ b/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/VCastLisFileParser.java
@@ -46,12 +46,18 @@ public class VCastLisFileParser implements ICoverageUnitFileContentsLoader {
if (!populated) {
populated = true;
String lisFilePathName = vCastDir + File.separator + lisFileName;
- File lisFile = new File(lisFilePathName);
- if (!lisFile.exists()) {
- if (!doesFileExist(lisFilePathName, lisFile)) {
- throw new OseeArgumentException(
- String.format("VectorCast *.LIS file doesn't exist [%s]", lisFilePathName));
+ File lisFile;
+ try {
+ lisFile = new File(lisFilePathName);
+ if (!lisFile.exists()) {
+ if (!doesFileExist(lisFilePathName, lisFile)) {
+ throw new OseeArgumentException(
+ String.format("VectorCast *.LIS file doesn't exist [%s]", lisFilePathName));
+ }
}
+ } catch (Exception ex) {
+ throw new OseeArgumentException(
+ String.format("Exception trying to find file [%s] [%s]", lisFilePathName, ex.getMessage()));
}
try {
fileText = Lib.fileToString(lisFile);

Back to the top