New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible BuildExceptionMessage problem [DNET243] #250
Comments
Modified by: @cincuranetreporter: Jiri Cincura [ cincura_net ] => tonim [ tonim ] description: The function public void BuildExceptionMessage() Inside iscexception.cs file catch the formating errors, and provides the message "No message error found". This error message (warning) have no arguments but has inside the message the {0} so the appendformat expect an artument at least. To fix this I think it should be done like this: Then the message is: Field Ambiguity, sql error {0}... => The function public void BuildExceptionMessage() This error message (warning) have no arguments but has To fix this I think it should be done like this: Then the message is: Field Ambiguity, sql error {0}... |
Commented by: @cincuranet Can you provide some sample? I followed your steps, but without success. In code: With this I get exception message: So no problem at all. |
Commented by: @cincuranet I need some example to see the problem and to fix it, if any. I will reopen the ticket, if somebody will provide it. |
Submitted by: tonim (tonim)
Votes: 1
The function public void BuildExceptionMessage()
Inside iscexception.cs file catch the formating errors, and
provides the message "No message error found".
An example is the sql warning 204 for dialect 1 connections
(order by code, where code can be a column of more than one
table)
This error message (warning) have no arguments but has
inside the message the {0} so the appendformat expect an
artument at least.
To fix this I think it should be done like this:
// Avoid incorrectly build mesage args
try
{
builder.AppendFormat(CultureInfo.CurrentCulture, message,
args);
}
catch
{
builder.Append(message);
}
Really the message exists but it's incorrectly build (or
incorrectly translated for future multilingual messages).
Then the message is: Field Ambiguity, sql error {0}...
instead of "No error message found for.."
The text was updated successfully, but these errors were encountered: