From: Mike N. <ta...@al...> - 2003-03-03 02:26:46
|
I can't really comment on the utility of the proposal. I did however start to think about some technical aspects of it. Marco Menardi wrote: > EXP_WRONG_CODE = 'THE CODE %s IS WRONG, TRY AGAIN'; I'm not so sure about the syntax of parameter substitution here. There are (at least) two issues: 1. The user have to learn/use different specifiers depending on data type. 2. It makes localisation awkward, since the position would be fixed relative any other substitution needed in the same exception. What about "{1}", "{2}" ... "{n}"? That would handle the seond problem outlined above, allowing something like FOO='Hey {3}, you can't {1} record #{2}!', and at use EXCEPTION FOO('delete', old.rec_id, 'Mike') It would be only one type used for these substitution, string. Any type used in the substitution would have to have to be convertible to string. If someone really had the urge or need to cast data types back and forth (maybe to truncate incoming strings) I see no reason to disallow it, but for the general case such casts wouldn't have to be performed - it would know how to turn e.g. an integer into a string. Just some technical ideas on a subject I otherwise haven't even considered. /Mike |