These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

Pheal uncaught exception

Author
Acuchai
Tyrannis Enterprises
#1 - 2012-05-28 09:49:21 UTC
Hi,

i am using PHeal to access the Eve API, sometimes i get

Uncaught exception 'PhealHTTPException' with message 'Service Unavailable' in /var/www/Pheal/Pheal.php:401

i assume that happens when the EVE API service is down. In my case i can work around this, but how is this kind of thing handled in other frameworks?

Regrads,

acu
Dragonaire
Here there be Dragons
#2 - 2012-05-28 22:10:23 UTC
Maybe they use:

try {
...
} catch (PhealHTTPException $e) {}

But that just a guess Blink

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Peter Powers
Terrorists of Dimensions
HORSE-KILLERS
#3 - 2012-05-29 07:38:09 UTC
Acuchai wrote:
Hi,

i am using PHeal to access the Eve API, sometimes i get

Uncaught exception 'PhealHTTPException' with message 'Service Unavailable' in /var/www/Pheal/Pheal.php:401

i assume that happens when the EVE API service is down. In my case i can work around this, but how is this kind of thing handled in other frameworks?

Regrads,

acu

Hi Acu,

the PhealHTTPException is thrown if there is a problem with the http request to the EVE API Servers. Specifically the "Service Unavailable" is caused by CCP's servers responding with a 503 Statuscode.

Exceptions like this one enable you to react to the error causing the exception, to learn how to handle Exceptions, i recommend to read up on the subject some random exception tutorial and PHP Manual on Exceptions

so what you want to do is catch the exception, and depending on your use case, display an error and exit, or schedule a retry.

3rdPartyEve.net - your catalogue for 3rd party applications

Acuchai
Tyrannis Enterprises
#4 - 2012-05-29 17:31:27 UTC
Dragonaire wrote:
Maybe they use:

try {
...
} catch (PhealHTTPException $e) {}

But that just a guess Blink


i am doing that on every PHeal class method call...
Jules Dupuit
Terrorists of Dimensions
HORSE-KILLERS
#5 - 2012-06-01 09:51:32 UTC
Acuchai wrote:
Dragonaire wrote:
Maybe they use:

try {
...
} catch (PhealHTTPException $e) {}

But that just a guess Blink


i am doing that on every PHeal class method call...

ignoring errors is always a good strategy.