eriq-augustine / psl

The PSL software from the LINQS lab.
Apache License 2.0
4 stars 7 forks source link

When an non existent predicate is given in the .data file an exception is thrown instead of error reporting #171

Closed vasiloglou closed 6 years ago

vasiloglou commented 6 years ago

if in the .data file I specify a predicate under targets that is nonexistent I get a java exception

Unexpected exception!

java.lang.IllegalArgumentException: Unknown predicate specified: null

at org.linqs.psl.database.rdbms.RDBMSDataStore.getInserter(RDBMSDataStore.java:216)

at org.linqs.psl.cli.DataLoader.loadData(DataLoader.java:121)

at org.linqs.psl.cli.DataLoader.loadPartitions(DataLoader.java:98)

at org.linqs.psl.cli.DataLoader.load(DataLoader.java:77)

at org.linqs.psl.cli.Launcher.loadData(Launcher.java:233)

at org.linqs.psl.cli.Launcher.run(Launcher.java:386)

at org.linqs.psl.cli.Launcher.main(Launcher.java:660)

at org.linqs.psl.cli.Launcher.main(Launcher.java:649)

ERROR: Failed to run inference

I would be better if you do a check and report it as an error. It would be easier for the users to figure out what is going wrong.

eriq-augustine commented 6 years ago

Complete in ac2f9a30d42951a4c0c9a90ade1edfdce0e2fe5d.