Karim wrote:
I did not explain myself clearly. I Kow when I fired it because it is in
code like:
If not value:
raise MyError('You did wrong here!')
And in that case I did not want the stack trace because I know perfectly
where the message is triggered.
Really?
You must have amazingly
On 27/11/11 12:11, Karim wrote:
I just wanted to know if it is possible to control the stack trace
display when raising my own exception.
No, and you should not try.
You can control the stacktrace display where you catch it, but not where
you raise it. And that's the point, you are raising i
Le 26/11/2011 15:20, Rich Lovely a écrit :
On 26 November 2011 11:41, Steven D'Aprano wrote:
Hugo Arts wrote:
On Sat, Nov 26, 2011 at 11:16 AM, Karim wrote:
Hello,
I want to fire my own exception without having the (useful but ugly in my
case) stack trace display.
How to modify a Exception
On 26 November 2011 11:41, Steven D'Aprano wrote:
> Hugo Arts wrote:
>>
>> On Sat, Nov 26, 2011 at 11:16 AM, Karim wrote:
>>>
>>> Hello,
>>>
>>> I want to fire my own exception without having the (useful but ugly in my
>>> case) stack trace display.
>>>
>>> How to modify a Exception type class fo
Hugo Arts wrote:
On Sat, Nov 26, 2011 at 11:16 AM, Karim wrote:
Hello,
I want to fire my own exception without having the (useful but ugly in my
case) stack trace display.
How to modify a Exception type class for that purpose which looks like:
classs MyError(Exception):
pass
Cheers
Ka
Karim wrote:
> I want to fire my own exception without having the (useful but ugly in
> my case) stack trace display.
Printing the stack trace is part of the standard exception handling. For an
uncaught exception python will call sys.excepthook which in turn will print
the traceback unless you
On Sat, Nov 26, 2011 at 11:16 AM, Karim wrote:
>
> Hello,
>
> I want to fire my own exception without having the (useful but ugly in my
> case) stack trace display.
>
> How to modify a Exception type class for that purpose which looks like:
>
> classs MyError(Exception):
> pass
>
> Cheers
>
Hello,
I want to fire my own exception without having the (useful but ugly in
my case) stack trace display.
How to modify a Exception type class for that purpose which looks like:
classs MyError(Exception):
pass
Cheers
Karim
___
Tutor mai