I don't understand why do I get a when build.py script is checking
for Python.h header file before it compiles Phoenix.
Checking for header Python.h :
Phoenix compiles successfuly though, but I don't understant why do I get
that sad face. Anyone knows?
It looks like there is a failure inside a try/except, so presumably something in the except clause is working around the issue and allowing the build to continue.
But the build should not continue then… Can you take a look at the try/except? I looked at the source but could not find any obvious mistakes.
···
On Mon, Apr 8, 2013 at 10:07 PM, Robin Dunn robin@alldunn.com wrote:
Boštjan Mejak wrote:
I don’t understand why do I get a when build.py script is checking
for Python.h header file before it compiles Phoenix.
Checking for header Python.h :
Phoenix compiles successfuly though, but I don’t understant why do I get
that sad face. Anyone knows?
It looks like there is a failure inside a try/except, so presumably something in the except clause is working around the issue and allowing the build to continue.
Why? That is the main purpose of the except clause in a try/except statement, to gracefully recover from a problem. If it's also able to work around the problem and allow the program to continue then that's even better.
Consider this:
try:
foo()
except:
bar()
It is expected and acceptable that foo can fail, that is why the programmer used the try/except, and just because it may fail does not mean that something is wrong or broken. It just means that some other bit of code should be executed instead. If foo returned an error code instead of raising an exception then something like the following would be equivalent to the code above:
if foo() != success_code:
bar()
and I'm sure you will agree that using if statements is not an uncommon thing to do.
Robin, do you get that sad face as well when you compile Phoenix from source? Also, can you link me to the source code that has this try/except clause?
···
On Tue, Apr 9, 2013 at 11:06 PM, Robin Dunn robin@alldunn.com wrote:
Boštjan Mejak wrote:
But the build should not continue then…
Why? That is the main purpose of the except clause in a try/except statement, to gracefully recover from a problem. If it’s also able to work around the problem and allow the program to continue then that’s even better.
Consider this:
try:
foo()
except:
bar()
It is expected and acceptable that foo can fail, that is why the programmer used the try/except, and just because it may fail does not mean that something is wrong or broken. It just means that some other bit of code should be executed instead. If foo returned an error code instead of raising an exception then something like the following would be equivalent to the code above:
if foo() != success_code:
bar()
and I’m sure you will agree that using if statements is not an uncommon thing to do.