Project

General

Profile

Actions

Bug #2278

closed

Unintuitive error reporting by SecPublicInfo (SecPublicInfoSqlite3)

Added by Alex Afanasyev almost 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Security
Target version:
Start date:
12/05/2014
Due date:
% Done:

100%

Estimated time:

Description

When the underlying database is corrupted (contains some old stuff), applications are likely to crash with unintuitive error

ERROR: (Block::get) Requested a non-existed type [7] from Block

We should try to catch tlv::Error exceptions when reading/decoding data from the database and throw a more reasonable error that will be easy to understand and debug for the user.


Related issues 1 (0 open1 closed)

Related to NFD - Bug #2274: ERROR: (Block::get) Requested a non-existed type [7] from BlockClosed12/04/2014

Actions
Actions #1

Updated by Alex Afanasyev almost 10 years ago

  • Related to Bug #2274: ERROR: (Block::get) Requested a non-existed type [7] from Block added
Actions #2

Updated by Junxiao Shi almost 10 years ago

We could define database version, which is incremented each time an incompatible change is made.
If the stored version differs from a constant in the library, the library shall either run upgrade procedure, or report that the database must be wiped because no upgrade is possible.

Actions #3

Updated by Alex Afanasyev almost 10 years ago

This probably be another useful thing, but separate from this issue. Even if the database is correct, the content of the database or some entries in the database may be corrupted. In this case, we still need to handle error and present a more meaningful error.

Actions #4

Updated by Davide Pesavento almost 10 years ago

By the way, I guess "non-existed" should be "non-existent".

Actions #5

Updated by Yingdi Yu almost 10 years ago

  • Status changed from New to Code review
  • % Done changed from 0 to 100
Actions #6

Updated by Alex Afanasyev almost 10 years ago

  • Status changed from Code review to Closed

Fixed in commit:a90ba482597d899fe638993f257ec83e4eca4524

Actions

Also available in: Atom PDF