Go to Post The game objectives are still the same, get boxes into your scoring zone, stack approximately half of them, run for the top of the ramp. So lets sit down, shut up, and start building robots. - ChrisH [more]
Home
Go Back   Chief Delphi > Other > FIRST-related Organizations > The Blue Alliance
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #19   Spotlight this post!  
Unread 04-05-2008, 20:06
Nibbles Nibbles is offline
Interstellar Hitchhiker
AKA: Austin Wright
FRC #0498 (Cobra Commanders)
Team Role: Alumni
 
Join Date: Jan 2008
Rookie Year: 2003
Location: Arizona
Posts: 103
Nibbles is just really niceNibbles is just really niceNibbles is just really niceNibbles is just really niceNibbles is just really nice
Re: [TBA]: API Client Development

Quote:
Originally Posted by Nibbles View Post
I noticed other threads with people having problems. PHP5 has this great new thing called Exceptions. If there is an error, it will kill the execution of the script, unless the programmer has a method of catching and handling the exception.
The official PHP client is serverely lacking in error checking, for instance, if the API server returns a blank XML (XHTML, say) document, then no error will pop up.
...
I implemented the function into the class file, and implemented more error checking and exception throwing.

No license of any sort was included with the PHP5 library, nothing. I modified it with rights implied, and my changes are in the public domain (since there is no real logic or creativity in my changes). Feel free to re-license with whatever you want.

List of changes:
  • implemented exceptions, replaced die() ("exit") calls too (see php.net/exceptions)
  • TBA_Exception class for handling API errors
  • PHPDocumentor comments
  • prepended tba_ to all functions as a namespace

I believe I mentioned this, but documenting stuff as a PDF file is very annoying, HTML is fine thank you.
Attached Files
File Type: zip tba_php5_api.zip (250.0 KB, 95 views)
__________________
Help standardize match data! Use the XML interchange format. (Specification page)
AAA_awright on Freenode IRC chat. (Join us at ##FRC on chat.freenode.net, or in your browser)

Last edited by Nibbles : 04-05-2008 at 20:06. Reason: rogue link
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[TBA]: Issues with TBA API FRANK(WGH) The Blue Alliance 7 17-03-2008 11:39
[TBA]: Schedules and TBA API proegssilb The Blue Alliance 3 09-03-2008 15:55
[TBA] The Blue Alliance API cjelly The Blue Alliance 9 24-02-2008 23:37
[TBA] TBA Presents... Soldering and Multimeter Tutorials Greg Marra General Forum 0 27-01-2007 20:15
What FTP Client do you use? sanddrag Website Design/Showcase 31 18-05-2005 20:57


All times are GMT -5. The time now is 02:18.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi