You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class Ex1 : Exception
{
}
class Ex2 : Exception
{
}
class TestExceptionsWhen
{
public void Main(int y)
{
int x = 5;
try
{
x = x / y;
}
catch (Exception ex) when (ex is Ex1 || ex is Ex2)
{
}
}
}
The text was updated successfully, but these errors were encountered:
Probably is just a partial solution. I created two handles: one for the filter and its catch block but I treat Filters as Catch blocks (that has to be fixed)
I'm not sure what the underlying cause is but I wasn't able to reproduce the problem with a simpler code snippet (such as without using the 'when' keyword).
Please confirm whether you're able to reproduce this issue and whether to file it as a separate issue.
The following code throws an exception.
The text was updated successfully, but these errors were encountered: