Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • you can also build a "complex" enum (enum with attributes) to embed the level of error in the Enum. However be careful because if you use somme serialization tools, that might not pass very well. Commented Jun 23, 2017 at 14:23
  • Throwing up exceptions in the error cases and saving the enums for success only is also an option. Commented Jun 23, 2017 at 16:14
  • @T.Sar Well, as I understood they are not errors per se but denials to create a session for some reason. I will edit the answer. Commented Jun 23, 2017 at 16:39
  • @T.Sar I changed the values to PASS, WAIVER and DENIAL to make it clear thar what I previously called ERROR is a valid status. Maybe now I should come up with a better name for Severity Commented Jun 23, 2017 at 16:59
  • I was thinking of something else with my suggestion, but I really liked your suggestion! I'm throwing up a +1, for sure! Commented Jun 23, 2017 at 17:03