Files
cefsharp/CefSharp.Example/ExceptionTestBoundObject.cs
T
illfang ae32ed4955 added test html logging exception log messages: ExceptionTest.html
custom://cefsharp/ExceptionTest.html
2015-09-08 16:27:05 +10:00

48 lines
1.2 KiB
C#

// Copyright © 2010-2015 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
namespace CefSharp.Example
{
public class ExceptionTestBoundObject
{
[DebuggerStepThrough]
private double DivisionByZero(int zero)
{
return 10 / zero;
}
[DebuggerStepThrough]
public double TriggerNestedExceptions()
{
try
{
try
{
return DivisionByZero(0);
}
catch (Exception innerException)
{
throw new InvalidOperationException("Nested Exception Invalid", innerException);
}
} catch (Exception e)
{
throw new OperationCanceledException("Nested Exception Canceled", e);
}
}
[DebuggerStepThrough]
public int TriggerParameterException(int parameter)
{
return parameter;
}
}
}