1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-05 07:15:39 +02:00

Add throws CDIException to new ICDIFormattable, as per Mikhail's recommendation.

This commit is contained in:
John Cortell 2007-04-24 11:54:38 +00:00
parent fb48e813d1
commit 8cf690c623
2 changed files with 3 additions and 2 deletions

View file

@ -21,6 +21,7 @@ public interface ICDIFormattable {
* @return one of the ICDIFormat constants, excluding 'NATURAL' and 'OCTAL'. * @return one of the ICDIFormat constants, excluding 'NATURAL' and 'OCTAL'.
* Octal is not supported simply because the general support for it * Octal is not supported simply because the general support for it
* is lacking in CDT (apparently no one is asking for it). * is lacking in CDT (apparently no one is asking for it).
* @throws CDIException
*/ */
int getNaturalFormat(); int getNaturalFormat() throws CDIException;
} }

View file

@ -566,7 +566,7 @@ public class CValue extends AbstractCValue {
} }
} }
private static CVariableFormat getNaturalFormat(ICDIValue value, CVariableFormat defaultFormat) { private static CVariableFormat getNaturalFormat(ICDIValue value, CVariableFormat defaultFormat) throws CDIException {
if (value instanceof ICDIFormattable) { if (value instanceof ICDIFormattable) {
int naturalFormat = ((ICDIFormattable)value).getNaturalFormat(); int naturalFormat = ((ICDIFormattable)value).getNaturalFormat();
switch (naturalFormat) { switch (naturalFormat) {