Class UserFacingException
- Namespace
- McServerLauncher.Services
- Assembly
- McServerLauncher.dll
A failure whose message was written for the user — translated, complete, ready to show.
public sealed class UserFacingException : InvalidOperationException, ISerializable
- Inheritance
-
UserFacingException
- Implements
- Inherited Members
Remarks
The app throws two kinds of exception. Some carry a sentence from the .resx files ("Paper has no
build for 1.21.9"); the rest come from .NET, the OS or a web service, in English or in the
system's language, naming paths and error codes. Both used to reach the screen the same way, as
ex.Message, so the second kind showed up as English text in the middle of a Spanish one.
Throwing this type is how code says "this message is the one to show".
Describe(Exception) passes it through untouched and turns everything else
into a sentence of its own. It derives from InvalidOperationException because that
is what these messages were thrown as, so every catch written for them still catches them.
Constructors
UserFacingException(string)
public UserFacingException(string message)
Parameters
messagestring
UserFacingException(string, Exception)
public UserFacingException(string message, Exception inner)