00001
00002
00003 import jpl.Query;
00004 import jpl.fli.Prolog;
00005 import jpl.*;
00006
00007 public class Exceptions
00008 {
00009 public static void
00010 main( java.lang.String argv[] )
00011 {
00012
00013
00014
00015
00016 Prolog.set_default_init_args(
00017 new String[] {
00018 "libpl.dll",
00019 "-f", "none",
00020 "-g", "set_prolog_flag(debug_on_error,false)",
00021 "-q"
00022 }
00023 );
00024
00025 System.out.print( "calling\n\n");
00026 System.out.print( "?- X is Y.\n\n");
00027 System.out.print( "in Prolog to force a Prolog 'instantiation_error' exception,\n" );
00028 System.out.print( "which should be returned via Java as an uncaught jpl.PrologException in thread \"main\":\n\n" );
00029
00030 (new Query("X is Y")).hasSolution();
00031 }
00032
00033 }