Show More
@@ -220,8 +220,8 b' class Pdb(OldPdb):' | |||
|
220 | 220 | self.context = int(context) |
|
221 | 221 | if self.context <= 0: |
|
222 | 222 | raise ValueError("Context must be a positive integer") |
|
223 | except (TypeError, ValueError): | |
|
224 | raise ValueError("Context must be a positive integer") | |
|
223 | except (TypeError, ValueError) as e: | |
|
224 | raise ValueError("Context must be a positive integer") from e | |
|
225 | 225 | |
|
226 | 226 | # `kwargs` ensures full compatibility with stdlib's `pdb.Pdb`. |
|
227 | 227 | OldPdb.__init__(self, completekey, stdin, stdout, **kwargs) |
@@ -326,8 +326,8 b' class Pdb(OldPdb):' | |||
|
326 | 326 | context=int(context) |
|
327 | 327 | if context <= 0: |
|
328 | 328 | raise ValueError("Context must be a positive integer") |
|
329 | except (TypeError, ValueError): | |
|
330 | raise ValueError("Context must be a positive integer") | |
|
329 | except (TypeError, ValueError) as e: | |
|
330 | raise ValueError("Context must be a positive integer") from e | |
|
331 | 331 | try: |
|
332 | 332 | for frame_lineno in self.stack: |
|
333 | 333 | self.print_stack_entry(frame_lineno, context=context) |
@@ -342,8 +342,8 b' class Pdb(OldPdb):' | |||
|
342 | 342 | context=int(context) |
|
343 | 343 | if context <= 0: |
|
344 | 344 | raise ValueError("Context must be a positive integer") |
|
345 | except (TypeError, ValueError): | |
|
346 | raise ValueError("Context must be a positive integer") | |
|
345 | except (TypeError, ValueError) as e: | |
|
346 | raise ValueError("Context must be a positive integer") from e | |
|
347 | 347 | print(self.format_stack_entry(frame_lineno, '', context), file=self.stdout) |
|
348 | 348 | |
|
349 | 349 | # vds: >> |
General Comments 0
You need to be logged in to leave comments.
Login now