Skip to content
Snippets Groups Projects
Commit 5300fefa authored by dgelessus's avatar dgelessus
Browse files

Declare that Translator cannot throw IOException

The current BParser APIs don't throw IOExceptions directly anymore and
instead wrap them in BCompoundExceptions.
parent 7b7d5c5f
No related branches found
No related tags found
No related merge requests found
Pipeline #140183 passed
......@@ -108,11 +108,10 @@ public class TLC4B {
* Be aware that this method may take a long time to run for large/complex machines.
*
* @param path path to B machine file
* @throws IOException if files could not be read
* @throws BCompoundException if the machine file could not be parsed
* @throws TLC4BException if translation fails for any other reason
*/
public static void checkTLC4BIsApplicable(String path) throws IOException, BCompoundException {
public static void checkTLC4BIsApplicable(String path) throws BCompoundException {
TLC4B tlc4B = new TLC4B();
tlc4B.processArgs(new String[]{path, SILENT.cliArg()});
tlc4B.translate();
......@@ -134,7 +133,7 @@ public class TLC4B {
try {
checkTLC4BIsApplicable(path);
return null;
} catch (BCompoundException | IOException | TLC4BException e) {
} catch (BCompoundException | TLC4BException e) {
return e;
}
});
......@@ -386,7 +385,7 @@ public class TLC4B {
printlnVerbose("");
}
private void translate() throws IOException, BCompoundException {
private void translate() throws BCompoundException {
StopWatch.start(PARSING_TIME);
MP.printSilent("Parsing... ");
translator = new Translator(machineFileNameWithoutFileExtension,
......
package de.tlc4b;
import java.io.File;
import java.io.IOException;
import java.util.Map;
import java.util.Set;
......@@ -58,8 +57,7 @@ public class Translator {
start = parser.parseMachine(machineString);
}
public Translator(String machineName, File machineFile, String ltlFormula, String constantSetup)
throws BCompoundException, IOException {
public Translator(String machineName, File machineFile, String ltlFormula, String constantSetup) throws BCompoundException {
this.machineName = machineName;
this.ltlFormula = ltlFormula;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment