Skip to content

Commit 850ec07

Browse files
committed
refs #50
1 parent fad3594 commit 850ec07

File tree

2 files changed

+88
-0
lines changed

2 files changed

+88
-0
lines changed

DpdtInject.Injector/Src/Excp/DpdtException.cs

+11
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,23 @@
22

33
namespace DpdtInject.Injector.Src.Excp
44
{
5+
/// <summary>
6+
/// An exception type Dpdt are firing in case of something went wrong.
7+
/// </summary>
58
public class DpdtException : Exception
69
{
10+
/// <summary>
11+
/// Type of failure.
12+
/// </summary>
713
public DpdtExceptionTypeEnum Type
814
{
915
get;
1016
}
17+
18+
/// <summary>
19+
/// Additional argument associated with this exception.
20+
/// (usually here is full name of some type).
21+
/// </summary>
1122
public string AdditionalArgument
1223
{
1324
get;
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,106 @@
11
namespace DpdtInject.Injector.Src.Excp
22
{
3+
/// <summary>
4+
/// Error types Dpdt aware of.
5+
/// </summary>
36
public enum DpdtExceptionTypeEnum
47
{
8+
/// <summary>
9+
/// Unknown type.
10+
/// </summary>
511
NotSpecified,
12+
13+
/// <summary>
14+
/// General error. Something went really awful.
15+
/// </summary>
616
GeneralError,
17+
18+
/// <summary>
19+
/// Internal error of the Dpdt logic.
20+
/// </summary>
721
InternalError,
22+
23+
/// <summary>
24+
/// A required constructor argument is missing.
25+
/// </summary>
826
ConstructorArgumentMiss,
27+
28+
/// <summary>
29+
/// Duplicate binding found during resolution.
30+
/// </summary>
931
DuplicateBinding,
32+
33+
/// <summary>
34+
/// Such binding is unavailable.
35+
/// </summary>
1036
NoBindingAvailable,
37+
38+
/// <summary>
39+
/// Circular dependency in the binding tree is found.
40+
/// </summary>
1141
CircularDependency,
42+
43+
/// <summary>
44+
/// Dpdt cluster type should be partial to make Dpdt source generator succeeds.
45+
/// </summary>
1246
TargetClassMustBePartial,
47+
48+
/// <summary>
49+
/// For scoped binding scope object must exists.
50+
/// </summary>
1351
CustomScopeObjectDoesNotFound,
1452

53+
/// <summary>
54+
/// Incorrent binding in the from clause.
55+
/// For example, binding from dynamic is not allowed.
56+
/// Also, binding target type should implement binding from type
57+
/// and allow to cast itself to binding from type.
58+
/// </summary>
1559
IncorrectBinding_IncorrectFrom,
60+
61+
/// <summary>
62+
/// Incorrect binding in the to clause.
63+
/// </summary>
1664
IncorrectBinding_IncorrectTarget,
65+
66+
/// <summary>
67+
/// Incorrect return type of the method of a factory type.
68+
/// </summary>
1769
IncorrectBinding_IncorrectReturnType,
70+
71+
/// <summary>
72+
/// Incorrent binding statement. Possibly, incomplete.
73+
/// </summary>
1874
IncorrectBinding_IncorrectConfiguration,
1975

76+
/// <summary>
77+
/// Factory type cannot be built.
78+
/// </summary>
2079
CannotBuildFactory,
80+
81+
/// <summary>
82+
/// Bind method of the Dpdt cluster type must be parameter-less.
83+
/// </summary>
2184
BindMethodHasArguments,
2285

86+
/// <summary>
87+
/// Incorrent binding statement. Possibly, incomplete.
88+
/// </summary>
2389
IncorrectBinding_IncorrectClause,
90+
91+
/// <summary>
92+
/// A problem found in the settings scope of the binding.
93+
/// </summary>
2494
IncorrectBinding_IncorrectSetting,
2595

96+
/// <summary>
97+
/// Local binding has been found, but it's forbidden by specific setting.
98+
/// </summary>
2699
LocalBindingFound,
100+
101+
/// <summary>
102+
/// Dpdt cluster type cannot be used as a target for a binding statement.
103+
/// </summary>
27104
BindToClusterType
28105
}
29106
}

0 commit comments

Comments
 (0)