Add a new exception for invalid structure

This commit fixes too broad exception in output_parser. Otherwise, we
can't assert the Exception in unit tests.

Partially implements bp unit-tests

Change-Id: I9e45571dbf964a37dd9d0249a6f662216d5d046c
Merge "Add a new exception for invalid structure"