OpenPetra
Free Administration Software for Non-Profits
Ict.Common.Exceptions.TExceptionHelper Class Reference

Helper Class for handling Exceptions. More...

Static Public Member Functions

static bool IsExceptionCausedByUnavailableDBConnectionClientSide (Exception AException)
 Checks if a given Exception is caused by the fact that the DB Connection of the PetraServer isn't available. More...
 
static bool IsExceptionCausedByUnavailableDBConnectionServerSide (Exception AException)
 Checks if a given Exception is caused by the fact that the DB Connection isn't available and if so adds a specific Item to the Exception's Data Property. More...
 
static void ShowExceptionCausedByUnavailableDBConnectionMessage (bool AClientLogin)
 Shows a MessageBox to the user that explains to the user that the DB Connection is broken. Advice is given on how to proceed, depending on the value of AClientLogin . The same message gets logged, too. More...
 
static void ShowExceptionCausedByOutOfMemoryMessage (bool AReportWasBeingGenerated)
 Shows a MessageBox to the user that explains to the user that OpenPetra can't process that much data. The same message gets logged, too. More...
 

Static Public Attributes

static readonly string StrDBConnectionBroken
 todoComment More...
 
static readonly string StrDBConnectionBrokenRestored
 todoComment More...
 
static readonly string StrDBConnectionBrokenAdvice
 todoComment More...
 
static readonly string StrDBConnectionBrokenRemedyWhenLoggingIn
 todoComment More...
 
static readonly string StrDBConnectionBrokenRemedyWhenLoggedIn1
 todoComment More...
 
static readonly string StrDBConnectionBrokenRemedyWhenLoggedIn2
 todoComment More...
 
static readonly string StrDBConnectionBrokenRemedyWhenLoggedIn3
 todoComment More...
 
static readonly string StrDBConnectionBrokenRemedyWhenLoggedInFollowUpAction1
 todoComment More...
 
static readonly string StrDBConnectionBrokenRemedyWhenLoggedInFollowUpAction2
 todoComment More...
 
static readonly string StrDBConnectionBrokenTitle
 todoComment More...
 
static readonly string StrDBConnectionBrokenRecoveredTitlePrefix
 todoComment More...
 
static readonly string StrDBConnectionBrokenContactITSupport
 todoComment More...
 
static readonly string StrDBConnectionIssueDateTimeFooter
 todoComment More...
 
const string EXCEPTION_DATA_DBUNAVAILABLE = "DB_UNAVAILABLE"
 Used as a way of marking any Exception as being caused by the DB becoming unavilable. More...
 

Detailed Description

Helper Class for handling Exceptions.

Member Function Documentation

◆ IsExceptionCausedByUnavailableDBConnectionClientSide()

static bool Ict.Common.Exceptions.TExceptionHelper.IsExceptionCausedByUnavailableDBConnectionClientSide ( Exception  AException)
inlinestatic

Checks if a given Exception is caused by the fact that the DB Connection of the PetraServer isn't available.

There is a Method with nearly the same name, IsExceptionCausedByUnavailableDBConnectionServerSide which evaluates Exceptions that get thrown on the server side. That Method checks if a given Exception is caused by the fact that the DB Connection isn't available and if so adds a specific Item to the Exception's Data Property. This Item is checked for by IsExceptionCausedByUnavailableDBConnectionClientSide.

Parameters
AExceptionException to check.
Returns
True if the Exception is caused by the fact that the DB Connection of the PetraServer isn't available, false if not.

◆ IsExceptionCausedByUnavailableDBConnectionServerSide()

static bool Ict.Common.Exceptions.TExceptionHelper.IsExceptionCausedByUnavailableDBConnectionServerSide ( Exception  AException)
inlinestatic

Checks if a given Exception is caused by the fact that the DB Connection isn't available and if so adds a specific Item to the Exception's Data Property.

There is a Method with nearly the same name, IsExceptionCausedByUnavailableDBConnectionClientSide which evaluates Exceptions that get thrown from the server side to the client side. That Method checks for the presence of the TExceptionHelper.EXCEPTION_DATA_DBUNAVAILABLE entry in the Exception's Data Property, which the Method here IsExceptionCausedByUnavailableDBConnectionServerSide adds to Exceptions that are caused by the fact that the DB Connection isn't available.

Parameters
AExceptionException to check.
Returns
True if the Exception is caused by the fact that the DB Connection isn't available, false if not.

◆ ShowExceptionCausedByOutOfMemoryMessage()

static void Ict.Common.Exceptions.TExceptionHelper.ShowExceptionCausedByOutOfMemoryMessage ( bool  AReportWasBeingGenerated)
inlinestatic

Shows a MessageBox to the user that explains to the user that OpenPetra can't process that much data. The same message gets logged, too.

Parameters
AReportWasBeingGeneratedSet this to true if the Exception was encountered while a Report was generated otherwise to false.

◆ ShowExceptionCausedByUnavailableDBConnectionMessage()

static void Ict.Common.Exceptions.TExceptionHelper.ShowExceptionCausedByUnavailableDBConnectionMessage ( bool  AClientLogin)
inlinestatic

Shows a MessageBox to the user that explains to the user that the DB Connection is broken. Advice is given on how to proceed, depending on the value of AClientLogin . The same message gets logged, too.

Parameters
AClientLoginSet this to true if the Exception was encountered at Client login time, otherwise to false.

Member Data Documentation

◆ EXCEPTION_DATA_DBUNAVAILABLE

const string Ict.Common.Exceptions.TExceptionHelper.EXCEPTION_DATA_DBUNAVAILABLE = "DB_UNAVAILABLE"
static

Used as a way of marking any Exception as being caused by the DB becoming unavilable.

◆ StrDBConnectionBroken

readonly string Ict.Common.Exceptions.TExceptionHelper.StrDBConnectionBroken
static
Initial value:
= Catalog.GetString(
"The OpenPetra server has encountered a problem while accessing the OpenPetra database.\r\n\r\n" +
"We are sorry about this! Automatic attempts at restoring the database connection are underway.\r\n\r\n")

todoComment

◆ StrDBConnectionBrokenAdvice

readonly string Ict.Common.Exceptions.TExceptionHelper.StrDBConnectionBrokenAdvice
static
Initial value:
= Catalog.GetString(
"If you have seen an error message just before you got to see this message then you should definitely close " +
"the OpenPetra Client, if you haven't then you are still advised to close the OpenPetra Client because it might " +
"not be working stable anymore.\r\n")

todoComment

◆ StrDBConnectionBrokenContactITSupport

readonly string Ict.Common.Exceptions.TExceptionHelper.StrDBConnectionBrokenContactITSupport
static
Initial value:
= Catalog.GetString(
"In case the problem should persist for longer than a few minutes please contact your IT support staff.")

todoComment

◆ StrDBConnectionBrokenRecoveredTitlePrefix

readonly string Ict.Common.Exceptions.TExceptionHelper.StrDBConnectionBrokenRecoveredTitlePrefix
static
Initial value:
= Catalog.GetString(
"RECOVERED: ")

todoComment

◆ StrDBConnectionBrokenRemedyWhenLoggedIn1

readonly string Ict.Common.Exceptions.TExceptionHelper.StrDBConnectionBrokenRemedyWhenLoggedIn1
static
Initial value:
= Catalog.GetString(
"Please do not attempt to do any work with OpenPetra until you are told that the problem got rectified!!! ")

todoComment

◆ StrDBConnectionBrokenRemedyWhenLoggedIn2

readonly string Ict.Common.Exceptions.TExceptionHelper.StrDBConnectionBrokenRemedyWhenLoggedIn2
static
Initial value:
= Catalog.GetString(
" In case you have entered data that has not been saved then you can copy data that you see on " +
"screen(s) and paste it in a text document so that you can have it to hand later, or take a screenshot to preserve data " +
"that you still can see.\r\n\r\n")

todoComment

◆ StrDBConnectionBrokenRemedyWhenLoggedIn3

readonly string Ict.Common.Exceptions.TExceptionHelper.StrDBConnectionBrokenRemedyWhenLoggedIn3
static
Initial value:
= Catalog.GetString(
" In case you have entered data that has not been saved yet do try to save it now. Should this not be possible " +
"then you can copy data that you see on " +
"screen(s) and paste it in a text document so that you can have it to hand later, or take a screenshot to preserve data " +
"that you still can see.\r\n\r\n")

todoComment

◆ StrDBConnectionBrokenRemedyWhenLoggedInFollowUpAction1

readonly string Ict.Common.Exceptions.TExceptionHelper.StrDBConnectionBrokenRemedyWhenLoggedInFollowUpAction1
static
Initial value:
= Catalog.GetString(
"Once you have closed and restarted the OpenPetra Client you can attempt to log in to OpenPetra again. " +
"At that point you will find out if the login is already possible. ")

todoComment

◆ StrDBConnectionBrokenRemedyWhenLoggedInFollowUpAction2

readonly string Ict.Common.Exceptions.TExceptionHelper.StrDBConnectionBrokenRemedyWhenLoggedInFollowUpAction2
static
Initial value:
= Catalog.GetString(
"Once you have closed and restarted the OpenPetra Client you can log in to OpenPetra again.\r\n")

todoComment

◆ StrDBConnectionBrokenRemedyWhenLoggingIn

readonly string Ict.Common.Exceptions.TExceptionHelper.StrDBConnectionBrokenRemedyWhenLoggingIn
static
Initial value:
= Catalog.GetString(
"Unfortunately a login to OpenPetra is not possible while this is being addressed. Please retry the login in " +
"a minute or so to see if is already possible again. ")

todoComment

◆ StrDBConnectionBrokenRestored

readonly string Ict.Common.Exceptions.TExceptionHelper.StrDBConnectionBrokenRestored
static
Initial value:
= Catalog.GetString(
"The OpenPetra server has successfully recovered from a database access problem!\r\n\r\n")

todoComment

◆ StrDBConnectionBrokenTitle

readonly string Ict.Common.Exceptions.TExceptionHelper.StrDBConnectionBrokenTitle
static
Initial value:
= Catalog.GetString(
"Temporary Service Outage (OpenPetra Database Problem)")

todoComment

◆ StrDBConnectionIssueDateTimeFooter

readonly string Ict.Common.Exceptions.TExceptionHelper.StrDBConnectionIssueDateTimeFooter
static
Initial value:
= Catalog.GetString(
"\r\nSorry for any inconvenience caused. (Message issued on {0:F})")

todoComment


The documentation for this class was generated from the following file: