View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0004407 | Taler | obsolete component | public | 2016-04-11 22:12 | 2016-04-24 23:45 |
| Reporter | Florian Dold | Assigned To | Marcello Stanisci | ||
| Priority | normal | Severity | major | Reproducibility | have not tried |
| Status | closed | Resolution | fixed | ||
| Product Version | 0.0 | ||||
| Target Version | 0.0 | Fixed in Version | 0.0 | ||
| Summary | 0004407: bank throws exception classes instead of exception instances in some places | ||||
| Description | This is not how you're supposed to throw exception in Python. Always throw instances: "raise BadWireDetails()" and not "raise BadWireDetails". Also consider adding more information to the exceptions. | ||||
| Additional Information | @staticmethod def validate_wiredetails(wiredetails, schema): try: validictory.validate(wiredetails, schema) except (ValueError, TypeError): raise BadWireDetails return True | ||||
| Tags | No tags attached. | ||||
|
|
Note that exception catching DOES NOT WORK otherwise. |
|
|
Also in some case we mix exception handling and return values in ... "unconventional" ways: @staticmethod def validate_amount(amount, schema): try: validictory.validate(amount, schema) except (ValueError, TypeError): raise BadAmount() return True Note also that the "schema" parameter here is completely redundant. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2016-04-11 22:12 | Florian Dold | New Issue | |
| 2016-04-11 22:12 | Florian Dold | Status | new => assigned |
| 2016-04-11 22:12 | Florian Dold | Assigned To | => Marcello Stanisci |
| 2016-04-11 22:13 | Florian Dold | Note Added: 0010457 | |
| 2016-04-14 00:54 | Christian Grothoff | Severity | minor => major |
| 2016-04-14 00:54 | Christian Grothoff | Product Version | => 0.0 |
| 2016-04-14 00:54 | Christian Grothoff | Target Version | => 0.0 |
| 2016-04-14 19:38 | Florian Dold | Note Added: 0010474 | |
| 2016-04-18 10:00 | Marcello Stanisci | Status | assigned => resolved |
| 2016-04-18 10:00 | Marcello Stanisci | Resolution | open => fixed |
| 2016-04-24 23:45 | Christian Grothoff | Status | resolved => closed |
| 2016-04-24 23:45 | Christian Grothoff | Fixed in Version | => 0.0 |
| 2022-08-23 20:26 | Christian Grothoff | Category | bank (demonstrator) => py bank (demonstrator, obsolete) |
| 2023-12-03 01:23 | Christian Grothoff | Category | py bank (demonstrator, obsolete) => obsolete componet |
| 2023-12-11 20:08 | Florian Dold | Category | obsolete componet => obsolete component |