My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 11: [Suggestion] Don't let a library to control excution of main program
1 person starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  roga.lin
Closed:  May 2010


 
Reported by joeh...@gmail.com, Jan 30, 2010
I found there ara a lots of "exit()" calls in plurk_api.php .

As my coding style, I would love to have errors (or exceptions) handling in
my program, but the "exit()" calls will stop the execution of my program.

I don't think that's a good idea.


Feb 3, 2010
Project Member #1 roga.lin
the exit() only used in this case: if( ! $this->is_login) exit(PLURK_NOT_LOGIN);

because if you don't login(or keep a cookie), you can't do anything after that.

so call exit() to avoid to try plurk server too much times.

maybe i will adjust some structure to refine this situation.

Labels: -Type-Defect Type-Enhancement
Feb 3, 2010
Project Member #2 roga.lin
(No comment was entered for this change.)
Status: Accepted
Feb 3, 2010
Project Member #3 roga.lin
(No comment was entered for this change.)
Owner: roga.lin
Feb 3, 2010
#4 joeh...@gmail.com
I know the "exit()" calls could prevent developers from sending too much Plurk API
calls, but I don't think "exit()" is a good idea.

We still have some methods for preventing wrong Plurk API calls, such as:
* if ( $this->is_login ) { SEND_PLURK_API_CALL }
* if ( !$this->is_login ) { return ERROR; }
* .....
Feb 3, 2010
Project Member #5 roga.lin
yap, it is important.

i will think about it.

thanks a lot :D
May 6, 2010
Project Member #6 roga.lin
please check out the latest php-plurk-api.
Status: Done

Powered by Google Project Hosting