hello,
when i use :
try
{
Globals.TYPE_0.LoadRecipe("TYPE0");
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
the load recipe not run
but without try it's work fine !
but why ?
try catch not operational loadrecipe
Re: try catch not operational loadrecipe
Works fine. You need to have a recipe named "hello" to work. Otherwise, it will do nothing. Actually, no exception will be thrown so having a try catch here is pointless.
void Button1_Click(System.Object sender, System.EventArgs e)
{
try
{
Globals.Recipe1.LoadRecipe("Hello");
}
catch{
MessageBox.Show("Hello, I'm an Error!");
}
}
void Button1_Click(System.Object sender, System.EventArgs e)
{
try
{
Globals.Recipe1.LoadRecipe("Hello");
}
catch{
MessageBox.Show("Hello, I'm an Error!");
}
}
Re: try catch not operational loadrecipe
I found that trying to load some recipe, that fails, for example if it has a name containing single quote ('), the exception is not caught so the user doesnt' know the problem but the recipe is not correctly loaded.
My questions:
- how to catch and manage exception in case that internal system function Globals.Recipe1.LoadRecipe(Name) fails ?? Is that possible?
- what happens in the system when this function fails? What data are loaded? Random data?
- is there a list of known situation that cause a failing of LoadRecipe.
I found that with some special character in the name, for example single quote (') but for sure there are others situations
We are having issues with a customer where strange data (not corrected) are loaded and are not able to investigate and solve that.
Thank you
My questions:
- how to catch and manage exception in case that internal system function Globals.Recipe1.LoadRecipe(Name) fails ?? Is that possible?
- what happens in the system when this function fails? What data are loaded? Random data?
- is there a list of known situation that cause a failing of LoadRecipe.
I found that with some special character in the name, for example single quote (') but for sure there are others situations
We are having issues with a customer where strange data (not corrected) are loaded and are not able to investigate and solve that.
Thank you