111: X_RULE_TYPE in NUMBER
112: ) is
113: invalidRuleTypeException exception;
114: errorCode integer;
115: errorMessage ame_util.longestStringType;
116: begin
117: if (X_RULE_TYPE <> ame_util.authorityRuleType)
118: and (X_RULE_TYPE <> ame_util.exceptionRuleType) then
119: raise invalidRuleTypeException;
113: invalidRuleTypeException exception;
114: errorCode integer;
115: errorMessage ame_util.longestStringType;
116: begin
117: if (X_RULE_TYPE <> ame_util.authorityRuleType)
118: and (X_RULE_TYPE <> ame_util.exceptionRuleType) then
119: raise invalidRuleTypeException;
120: end if;
121: exception
114: errorCode integer;
115: errorMessage ame_util.longestStringType;
116: begin
117: if (X_RULE_TYPE <> ame_util.authorityRuleType)
118: and (X_RULE_TYPE <> ame_util.exceptionRuleType) then
119: raise invalidRuleTypeException;
120: end if;
121: exception
122: when invalidRuleTypeException then
121: exception
122: when invalidRuleTypeException then
123: errorCode := -20001;
124: errorMessage := 'OAM is attempting to upload an invalid rule type. ';
125: ame_util.runtimeException(packageNameIn => 'ame_rules_api2',
126: routineNameIn => 'validate_rule_type',
127: exceptionNumberIn => errorCode,
128: exceptionStringIn => errorMessage);
129: raise_application_error(errorCode,
128: exceptionStringIn => errorMessage);
129: raise_application_error(errorCode,
130: errorMessage);
131: when others then
132: ame_util.runtimeException('ame_rules_api2',
133: 'validate_rule_type',
134: sqlcode,
135: sqlerrm);
136: raise;
347: end loop;
348: return(X_NEW_RULE_KEY);
349: exception
350: when others then
351: ame_util.runtimeException('ame_rules_api',
352: 'create_rule_key',
353: sqlcode,
354: sqlerrm);
355: raise;
472: end if;
473: end;
474: exception
475: when others then
476: ame_util.runtimeException('ame_rules_api',
477: 'load_row',
478: sqlcode,
479: sqlerrm);
480: raise;