PR# 17345 Ribbon library missing contract and error handling

Problem Report Summary
Submitter: manus_eiffel
Category: Other
Priority: Medium
Date: 2011/02/15
Class: Bug
Severity: Serious
Number: 17345
Release: 6.8
Confidential: No
Status: Open
Responsible: manus_eiffel
Environment: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13
Synopsis: Ribbon library missing contract and error handling

Description
The current implementation of the ribbon library is not well contracted, nor do we perform any error handling.

For example, we should have a `exists' and possible `is_destroyed' queries that are used throughout.

The C code often does:

HRESULT hr = S_OK;
if ($a_framework) {
	hr = ((IUIFramework *) $a_framework)->InvalidateUICommand(
		(UINT32) $a_command_id,
		(UI_INVALIDATIONS) $a_flags,
		(PROPERTYKEY *) $a_proper_key);
}

but we never report an error if `a_framework' was Void or if `hr' is not S_OK.

You might end up loosing a lot of time debugging when something goes wrong.
To Reproduce

										
Problem Report Interactions