Skip to content

Commit 451dab8

Browse files
authored
Merge pull request #466 from digital-preservation/global-directive-error-not-showing-detail
details were missing from UI in case of a schema failure
2 parents cfdacce + 9de2172 commit 451dab8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

csv-validator-ui/src/main/scala/uk/gov/nationalarchives/csv/validator/ui/CsvValidatorUi.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ object CsvValidatorUi extends SimpleSwingApplication {
152152
case _ =>
153153
}
154154

155-
CsvValidatorCmdApp.validate(
155+
val cliResult = CsvValidatorCmdApp.validate(
156156
TextFile(Paths.get(csvFilePath), csvEncoding, validateEncoding),
157157
TextFile(Paths.get(csvSchemaFilePath), csvSchemaEncoding),
158158
failOnFirstError,
@@ -161,12 +161,12 @@ object CsvValidatorUi extends SimpleSwingApplication {
161161
trace = false,
162162
progress,
163163
rowCallback
164-
)._2 match {
164+
)
165+
166+
cliResult._2 match {
165167
case SystemExitCodes.ValidCsv => toConsole("PASS")
166-
case _ => toConsole("FAIL")
168+
case _ => toConsole(cliResult._1)
167169
}
168-
169-
170170
}
171171

172172
/**

0 commit comments

Comments
 (0)