Quantcast

Exception handling behaviour

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Exception handling behaviour

Alan Gordon White
As I understand it, Jason agents respond to an uncaught exception by  
re-instantiating their Circumstances.

(Assuming this is correct) Is there a way to override this behaviour,  
even just to the extent of throwing an explicit error dialog?  I find  
that I often 'lose' notification of these events in my morass of debug  
logs, and need to explicitly search logs post execution to become  
aware of them.

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.



------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exception handling behaviour

Jomi Hubner
Hi Alan,

these exceptions represent the worst case scenario, usually the errors are identified before and failure events are produced so that the programmer can deal with them in the AgentSpeak language.

the API is not prepared for overriding this behaviour. So the only solution now, if you need, is to change the source of the interpreter for your needs. It is quite easy, in your jason installation,
- change the code of the catch for the method reasoningCycle of class TransitionSystem (jason.asSemantics package)
- create a new jason.jar with the command
        cd <jason root directory, where build.xml is placed>
        ant jar

HTH,

Jomi

On 23/09/2013, at 06:49, Alan Gordon White wrote:

> As I understand it, Jason agents respond to an uncaught exception by  
> re-instantiating their Circumstances.
>
> (Assuming this is correct) Is there a way to override this behaviour,  
> even just to the extent of throwing an explicit error dialog?  I find  
> that I often 'lose' notification of these events in my morass of debug  
> logs, and need to explicitly search logs post execution to become  
> aware of them.
>
> --
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
>
>
>
> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
> _______________________________________________
> Jason-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jason-users

--
Jomi Fred Hubner
Federal University of Santa Catarina
Department of Automation and Systems Engineering
PO Box 476, Florianópolis, SC
88040-900 Brazil
http://www.das.ufsc.br/~jomi


------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Exception handling behaviour

Rafael H Bordini-2
Hi Alan,

If you do what Jomi suggests, don't forget that the LGPL license
requires you to change the name of any files that you change locally and
to keep the note saying where the sources come from and the copyright
note, perhaps adding a note to say you have changed the original Jason
files.

Cheers,

Rafael


On 23/09/2013 08:48, Jomi Hubner wrote:

> Hi Alan,
>
> these exceptions represent the worst case scenario, usually the errors are identified before and failure events are produced so that the programmer can deal with them in the AgentSpeak language.
>
> the API is not prepared for overriding this behaviour. So the only solution now, if you need, is to change the source of the interpreter for your needs. It is quite easy, in your jason installation,
> - change the code of the catch for the method reasoningCycle of class TransitionSystem (jason.asSemantics package)
> - create a new jason.jar with the command
> cd <jason root directory, where build.xml is placed>
> ant jar
>
> HTH,
>
> Jomi
>
> On 23/09/2013, at 06:49, Alan Gordon White wrote:
>
>> As I understand it, Jason agents respond to an uncaught exception by
>> re-instantiating their Circumstances.
>>
>> (Assuming this is correct) Is there a way to override this behaviour,
>> even just to the extent of throwing an explicit error dialog?  I find
>> that I often 'lose' notification of these events in my morass of debug
>> logs, and need to explicitly search logs post execution to become
>> aware of them.
>>
>> --
>> The University of Edinburgh is a charitable body, registered in
>> Scotland, with registration number SC005336.
>>
>>
>>
>> ------------------------------------------------------------------------------
>> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
>> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
>> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
>> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
>> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
>> _______________________________________________
>> Jason-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/jason-users


------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Jason-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jason-users
Loading...