Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, DotBot

Members: 0
Guests: 4
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » Try/Catch function?
Forum Rules | Mark all | Recent Posts

Try/Catch function?
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 May 9, 2013, 7:58 pm
Go to the top of the page
Go to the bottom of the page

Aurin
Magician
GroupMembers
Posts189
JoinedSep 5, 2010

Just looking to see if there's anything that mimics a try/catch function for the smaugfuss codebase? I admit that I haven't actually tried anything as yet, was just starting to look into the possibility as I don't ever remember seeing this implemented anywhere in the code.
       
Post is unread #2 May 9, 2013, 10:49 pm
Go to the top of the page
Go to the bottom of the page

GatewaySysop
Conjurer
GroupMembers
Posts367
JoinedMar 7, 2005

Maybe it's too late at night or something, but what do you mean by try/catch function? What are you wanting to do? Apologies if I don't follow, but it's been one of those days. :huh:

       
Post is unread #3 May 10, 2013, 1:28 am
Go to the top of the page
Go to the bottom of the page

Aurin
Magician
GroupMembers
Posts189
JoinedSep 5, 2010

Yeah, it was one of those days, which is why I posted the question! lol

But, it would look something like this:
try{
    <code to try goes here>
}
catch [System.Exception]{
    <code to do if what happens in the try section fails, this is usually a system error or something that causes a crash>
}
       
Post is unread #4 May 10, 2013, 6:59 am
Go to the top of the page
Go to the bottom of the page

Quixadhal
Conjurer
GroupMembers
Posts398
JoinedMar 8, 2005

SmaugFUSS is a dikurivative, so unless you meant in the mobprogram mini-language, you'd have to implement try/catch in C++, in the specific driver code you wanted to have a recovery option for.

I believe it will compile cleanly with g++, so that option is there. Good luck!
       
Post is unread #5 May 10, 2013, 8:31 am
Go to the top of the page
Go to the bottom of the page

Aurin
Magician
GroupMembers
Posts189
JoinedSep 5, 2010

So, looks like it compiled cleanly. :) Will have to wait and see if the function works around the problem section. heh

Thanks for the responses.
       
Post is unread #6 May 10, 2013, 10:36 am
Go to the top of the page
Go to the bottom of the page

Zeno
Sorcerer
GroupMembers
Posts723
JoinedMar 5, 2005

       
Pages:<< prev 1 next >>