← Back to team overview

banking-addons-team team mailing list archive

Re: lp:~akretion-team/banking-addons/bank-statement-reconcile-70-debug-improvement into lp:banking-addons/bank-statement-reconcile-7.0

 

Hi Pedro
If you look at the code you will see that there is a try/except http://bazaar.launchpad.net/~akretion-team/banking-addons/bank-statement-reconcile-70-debug-improvement/view/head:/account_statement_base_import/statement.py#L171
For now if an error occure and you have activated the option "--debug" your pdb will be in the except and not where the error have been generated. And so it's really hard to debug the parser that you try to implement, a "borring" solution is to remove temporary the try/except in order to know where the error have been generated.
The other solution is to not 're-catch' the error when we are in debbug mode.

A simple case to test it is to add "print undefined_variable" in the method "prepare_statetement_lines_vals"
(http://bazaar.launchpad.net/~akretion-team/banking-addons/bank-statement-reconcile-70-debug-improvement/view/head:/account_statement_base_import/statement.py#L104)

And than start the server with the option "--debug", if you didn't add my path the pdb will be in the line 217, if you add my path the pdb will be where you have added the "print undefined_variable"

What do you think, do you have a better solution for improving the debbug mode with try/except block?


Thanks
-- 
https://code.launchpad.net/~akretion-team/banking-addons/bank-statement-reconcile-70-debug-improvement/+merge/197771
Your team Banking Addons Core Editors is subscribed to branch lp:banking-addons/bank-statement-reconcile-7.0.