mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
8c01046d3d
Braces on new lines Make method static
45 lines
1.1 KiB
C#
45 lines
1.1 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.Diagnostics;
|
|
|
|
namespace CefSharp.Example
|
|
{
|
|
public class ExceptionTestBoundObject
|
|
{
|
|
[DebuggerStepThrough]
|
|
private static 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;
|
|
}
|
|
}
|
|
}
|