Search found 20 matches

by pedrofmj
Wed Jan 21, 2015 8:48 pm
Forum: Help
Topic: Raising an exception on a message hook doesn't fail the Java
Replies: 6
Views: 7191

Re: Raising an exception on a message hook doesn't fail the

Hi Dr. Paulo, Thanks for you help to me back being a mindcracker. What worked: logtalk::message_hook(failed_test(Test, File, Position, Reason), _, lgtunit, _) :- halt. Only this small change solved the entire problem! Maybe missed some context: I want to HALT the build process when we get any error ...
by pedrofmj
Wed Jan 21, 2015 8:02 pm
Forum: Help
Topic: Raising an exception on a message hook doesn't fail the Java
Replies: 6
Views: 7191

Re: Raising an exception on a message hook doesn't fail the

Ok. I'll try that. Thank you,

Pedro.
by pedrofmj
Wed Jan 21, 2015 6:47 pm
Forum: Help
Topic: Raising an exception on a message hook doesn't fail the Java
Replies: 6
Views: 7191

Re: Raising an exception on a message hook doesn't fail the

Hi Dr. Paulo. In fact, in theory, There is no problem in the Exception catching... It's because I'm trying to do a generic bridge Prolog Exception <-> Java Exception for the unit tests. But I'm now thinking this is not possible with the current unit test code. the exceptions are converted into ERROR...
by pedrofmj
Wed Jan 21, 2015 3:26 pm
Forum: Help
Topic: Problem when loading jpl_new/3
Replies: 4
Views: 1937

Re: Problem when loading jpl_new/3

Ok Dr. Paulo.

Sorry, I'm getting familiar with the software, and the website.
I will pay more attention on that., and take a deep look on the documentation.

Thank you,

Pedro.
by pedrofmj
Wed Jan 21, 2015 11:58 am
Forum: Help
Topic: Raising an exception on a message hook doesn't fail the Java
Replies: 6
Views: 7191

Re: Raising an exception on a message hook doesn't fail the

Hi Dr. Paulo, I tryied a lot of ways to do the exception be catched by the JUnit test, and it failed. It simply doens't forward the exception and put the message as an ERROR from logtalk message. I need turn the ERROR message and actual JUnit failing. [exec] [junit] ERROR: /home/pedrofmj/logtalk/exa...
by pedrofmj
Wed Jan 21, 2015 6:11 am
Forum: Help
Topic: Raising an exception on a message hook doesn't fail the Java
Replies: 6
Views: 7191

Raising an exception on a message hook doesn't fail the Java

Hi Dr. Paulo, I'm trying to forward an exception from a Logtalk unit test to a JUnit Test (Logtalk on Java through JPL/SWI-Prolog) The exception is correctly generated from Logtalk: [exec] [junit] ERROR: /home/pedrofmj/logtalk/examples/ack/.lgt_tmp/tester_lgt.pl:1: Initialization goal raised excepti...
by pedrofmj
Wed Jan 21, 2015 5:51 am
Forum: Help
Topic: Problem when loading jpl_new/3
Replies: 4
Views: 1937

Re: Problem when loading jpl_new/3

Dr. Paulo,

Excellent! I put inside the test settings block, and it worked.

Could you please define for the forum what is an Entity? I couldn't understand from the documentation, and it's good for someone who reads this post understand what to do.
by pedrofmj
Tue Jan 20, 2015 10:51 pm
Forum: Help
Topic: Problem when loading jpl_new/3
Replies: 4
Views: 1937

Problem when loading jpl_new/3

Hi Dr. Paulo, I got this error: [exec] ! error(existence_error(source_sink,jpl),_G2247) [exec] ! in directive :- use_module(jpl,[jpl_new/3]) [exec] ! in file /home/pedrofmj/Projects/Idea/EgypTeam/Artificial Intelligence/Khalid/khalid-java/dist/settings.lgt between lines 83-84 This is how I import th...
by pedrofmj
Tue Jan 20, 2015 5:02 pm
Forum: Help
Topic: How to run the Unit tests of the examples on the fly
Replies: 5
Views: 2066

Re: How to run the Unit tests of the examples on the fly

Ok Dr. Paulo, understood.

Continuing with the subject Unit tests.

I'm running througth JPL over SWI Prolog/Java

When some test fails, it doesn't raise an error so that JUnit from Java can catch the error.

Is there an option for that? Or does it require modification?

Thanks,

Pedro.
by pedrofmj
Tue Jan 20, 2015 2:53 pm
Forum: Help
Topic: How to run the Unit tests of the examples on the fly
Replies: 5
Views: 2066

Re: How to run the Unit tests of the examples on the fly

The output of the JUnit tests are ok, but I received a lot of redefinition warning messages: Here is a part of them: [exec] [junit] Warning: /home/pedrofmj/logtalk/examples/people/.lgt_tmp/tests_lgt.pl:2: [exec] [junit] Redefined static procedure $tests#0._dcl/6 [exec] [junit] Previously defined at ...
by pedrofmj
Tue Jan 20, 2015 1:15 pm
Forum: Help
Topic: How to run the Unit tests of the examples on the fly
Replies: 5
Views: 2066

Re: How to run the Unit tests of the examples on the fly

I could solve.

I just ran directly tester.lgt after loading logtalking into the application.

Thanks by the way!
by pedrofmj
Tue Jan 20, 2015 1:04 pm
Forum: Help
Topic: How to run the Unit tests of the examples on the fly
Replies: 5
Views: 2066

How to run the Unit tests of the examples on the fly

Hi there Dr. Paulo, I would like to run the unit tests from the examples (e.g. ack) outside the logtalk_tester tool, inside my application. I want to do this because my application it's a Java application that uses Logtalk, and I'm adding unit tests for Logtalk there. The unit tests are mandatory fo...
by pedrofmj
Tue Jan 20, 2015 11:41 am
Forum: SICStus Prolog
Topic: MOLOG through SICStus Prolog compatibility (NCL support)
Replies: 1
Views: 8013

MOLOG through SICStus Prolog compatibility (NCL support)

Hi Dr. Paulo, I see that your system supports also SICStus Prolog. I found this: http://www.mimuw.edu.pl/~nguyen/mprolog.html and then http://www.irit.fr/ACTIVITES/EQ_ALG/Herzig/molog.html Do you think your system would be compatible with MOLOG over SICStus Prolog? I would like to let my system modu...
by pedrofmj
Sun Jan 18, 2015 8:33 pm
Forum: Help
Topic: Supressing Informational Messages
Replies: 11
Views: 3438

Re: Supressing Informational Messages

Perfect, Dr. Paulo.

The test script has this predicate.

So, that's very fine!

Screenshot:
tela3.png
Demo 3
tela3.png (58.14 KiB) Viewed 3426 times
by pedrofmj
Sun Jan 18, 2015 7:54 pm
Forum: Help
Topic: Supressing Informational Messages
Replies: 11
Views: 3438

Re: Supressing Informational Messages

Now it's better. There is only one final message. I couldn't find the consult for it, I think there isn't how to remove it without changing the core, or then there is an option for that, that is the global message for all computation done.

Here is the image below.

Screenshot:
tela2.png
Demo
tela2.png (60.64 KiB) Viewed 3427 times