/
SelectorException.cs
68 lines (62 loc) · 2.43 KB
/
SelectorException.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
using System;
using System.Runtime.Serialization;
namespace PuppeteerSharp
{
/// <summary>
/// Exception thrown when an element selector returns null.
/// </summary>
/// <seealso cref="PuppeteerHandleExtensions.EvaluateFunctionAsync{T}(System.Threading.Tasks.Task{IElementHandle}, string, object[])"/>
/// <seealso cref="IFrame.SelectAsync(string, string[])"/>
/// <seealso cref="IPage.ClickAsync(string, Input.ClickOptions)"/>
/// <seealso cref="IPage.TapAsync(string)"/>
/// <seealso cref="IPage.HoverAsync(string)"/>
/// <seealso cref="IPage.FocusAsync(string)"/>
/// <seealso cref="IPage.SelectAsync(string, string[])"/>
[Serializable]
public class SelectorException : PuppeteerException
{
/// <summary>
/// Initializes a new instance of the <see cref="SelectorException"/> class.
/// </summary>
public SelectorException()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="SelectorException"/> class.
/// </summary>
/// <param name="message">Message.</param>
public SelectorException(string message) : base(message)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="SelectorException"/> class.
/// </summary>
/// <param name="message">Message.</param>
/// <param name="selector">Selector.</param>
public SelectorException(string message, string selector) : base(message)
{
Selector = selector;
}
/// <summary>
/// Initializes a new instance of the <see cref="SelectorException"/> class.
/// </summary>
/// <param name="message">Message.</param>
/// <param name="innerException">Inner exception.</param>
public SelectorException(string message, Exception innerException) : base(message, innerException)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="SelectorException"/> class.
/// </summary>
/// <param name="info">Serialization Info.</param>
/// <param name="context">Streaming Context.</param>
protected SelectorException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
/// <summary>
/// Gets the selector.
/// </summary>
/// <value>The selector.</value>
public string Selector { get; }
}
}