En Fri, 09 Apr 2010 23:19:48 -0300, kwatch escribió:
On 4月8日, 午後12:52, "Gabriel Genellina" wrote:
The built-in SyntaxError exception does what you want. Constructor
parameters are undocumented, but they're as follows:
raise SyntaxError("A descriptive error message", (filename,
line
On 4月8日, 午後12:52, "Gabriel Genellina" wrote:
>
> The built-in SyntaxError exception does what you want. Constructor
> parameters are undocumented, but they're as follows:
>
> raise SyntaxError("A descriptive error message", (filename, linenum,
> colnum, source_line))
>
> colnum is used to
En Wed, 07 Apr 2010 17:23:22 -0300, kwatch escribió:
Is it possible to raise exception with custom traceback to specify
file and line?
I'm creating a certain parser.
I want to report syntax error with the same format as other exception.
-
1: def parse(filename):
2: i
Hi all,
Is it possible to raise exception with custom traceback to specify
file and line?
Situation
=
I'm creating a certain parser.
I want to report syntax error with the same format as other exception.
Example
===
parser.py:
-
1: def parse(filename):
2: