Text.PCLT.MakeMessage
Description
Module around pcsi2text
function, which generates a message out of PCSI
and PCLT_Catalog
.
- data PCSI2Text_Error
- = RequiredCompositeIsMissing_P2TE RequiredByRequirerCompositeIsMissing_PCLTE
- | RequiredCompositeLoclizationIsMissing_P2TE RequiredByRequirerCompositeIsMissing_PCLTE LanguageName
- | CompositionCycle_P2TE CompositionCycle_PCLTE
- | SDL_DeterminationFailure_P2TE PCLT_ID SDL_DeterminationFailure
- | UnsupportedMarker_P2TE SeparatedSectorMarker ByteString PCLT_ID LanguageName
- | NoValueForParameter_P2TE PCLT_ID LanguageName PCLT_ParamKey
- | UnderAccordingParamReparsingFailure_P2TE PCLT_ID LanguageName PCLT_ParamKey ReadPCSCatalogError
- | ReparsingDepthMaxReached_P2TE PCLT_ID LanguageName PCLT_ParamKey ReparsingDepth
- | ReparsingLengthMaxReached_P2TE PCLT_ID LanguageName PCLT_ParamKey ForInstaniationUsedChunkLength
- | InstaniationLengthMaxReached_P2TE PCLT_ID LanguageName ForInstaniationUsedChunkLength
- data SDL_DeterminationFailure
- = RequiredCompositeIsMissing_SDLDF RequiredByRequirerCompositeIsMissing_PCLTE
- | MissingParam_SDLByParamCompositeLink_SDLDF PCLT_CompositeKey PCLT_ParamKey
- | WrongParamType_SDLByParamCompositeLink_SDLDF PCLT_CompositeKey PCLT_ParamKey
- | UnknownComposite_SDLByParamCompositeLink_SDLDF PCLT_CompositeKey PCLT_ParamKey PCLT_CompositeKey
- | SDLReferentialCycle_SDLDF PCLT_CompositeKey [PCLT_ID]
- | ErrornousSDL_SDLDF PCLT_CompositeKey PCLT_ErrornousSDL
- data PCSI2Text_Error_Type
- = RequiredCompositeIsMissing_P2TET
- | RequiredCompositeLoclizationIsMissing_P2TET
- | CompositionCycle_P2TET
- | SDL_DeterminationFailure_P2TET SDL_DeterminationFailure_Type
- | UnsupportedMarker_P2TET
- | NoValueForParameter_P2TET
- | UnderAccordingParamReparsingFailure_P2TET
- | ReparsingDepthMaxReached_P2TET
- | ReparsingLengthMaxReached_P2TET
- | InstaniationLengthMaxReached_P2TET
- data SDL_DeterminationFailure_Type
- p2teType :: PCSI2Text_Error -> PCSI2Text_Error_Type
- sdldfType :: SDL_DeterminationFailure -> SDL_DeterminationFailure_Type
- shortOf_PCSI2Text_Error :: PCSI2Text_Error -> ByteString
- includeAsAnError :: PCLT_InnerConfig -> PCSI2Text_Error -> String -> (ByteString, ForInstaniationUsedChunkLength)
- givenSDL_statisfies :: ShowDetalizationLevel -> PCSI -> PCLT_ShowDetalizationLevel -> PCLT_CatalogMap -> Either SDL_DeterminationFailure Bool
- type SpaceAvailableForPCSIInstaniation = MarkedChunkLength
- type ForInstaniationUsedChunkLength = MarkedChunkLength
- pcsi2new_text :: PCSI -> (ShowDetalizationLevel, LanguageName) -> PCLT_Catalog -> (StdOut_CLBS, [ErrorWithPCSCatalog PCSI2Text_Error])
- pcsi2text :: StdOut_CLBS -> PCSI -> (ShowDetalizationLevel, LanguageName) -> PCLT_Catalog -> (StdOut_CLBS, [ErrorWithPCSCatalog PCSI2Text_Error])
Documentation
data PCSI2Text_Error Source
Error type for pcsi2text
.
Constructors
RequiredCompositeIsMissing_P2TE RequiredByRequirerCompositeIsMissing_PCLTE | |
RequiredCompositeLoclizationIsMissing_P2TE RequiredByRequirerCompositeIsMissing_PCLTE LanguageName | |
CompositionCycle_P2TE CompositionCycle_PCLTE | |
SDL_DeterminationFailure_P2TE PCLT_ID SDL_DeterminationFailure | |
UnsupportedMarker_P2TE SeparatedSectorMarker ByteString PCLT_ID LanguageName | This error is possible only if program is wrong. |
NoValueForParameter_P2TE PCLT_ID LanguageName PCLT_ParamKey | |
UnderAccordingParamReparsingFailure_P2TE PCLT_ID LanguageName PCLT_ParamKey ReadPCSCatalogError | Not used, reserved for future versions. |
ReparsingDepthMaxReached_P2TE PCLT_ID LanguageName PCLT_ParamKey ReparsingDepth | Not used, reserved for future versions. |
ReparsingLengthMaxReached_P2TE PCLT_ID LanguageName PCLT_ParamKey ForInstaniationUsedChunkLength | Not used, reserved for future versions. |
InstaniationLengthMaxReached_P2TE PCLT_ID LanguageName ForInstaniationUsedChunkLength | No more free space in resulting |
data SDL_DeterminationFailure Source
Error type for givenSDL_statisfies
.
Constructors
RequiredCompositeIsMissing_SDLDF RequiredByRequirerCompositeIsMissing_PCLTE | |
MissingParam_SDLByParamCompositeLink_SDLDF PCLT_CompositeKey PCLT_ParamKey | The SDL of template is specified
(using |
WrongParamType_SDLByParamCompositeLink_SDLDF PCLT_CompositeKey PCLT_ParamKey | The SDL of template is specified
(using |
UnknownComposite_SDLByParamCompositeLink_SDLDF PCLT_CompositeKey PCLT_ParamKey PCLT_CompositeKey | The SDL of template is specified
(using |
SDLReferentialCycle_SDLDF PCLT_CompositeKey [PCLT_ID] | |
ErrornousSDL_SDLDF PCLT_CompositeKey PCLT_ErrornousSDL |
data PCSI2Text_Error_Type Source
Type of PCSI2Text_Error
. Stripping arguments.
Constructors
data SDL_DeterminationFailure_Type Source
Type of SDL_DeterminationFailure
. Stripping arguments.
shortOf_PCSI2Text_Error :: PCSI2Text_Error -> ByteStringSource
Template representation generation errors types abbreviations:
RequiredCompositeIsMissing_P2TET -> "CM" RequiredCompositeLoclizationIsMissing_P2TET -> "CLM" CompositionCycle_P2TET -> "CC" SDL_DeterminationFailure_P2TET sdldft -> "SF" ++ case sdldft of RequiredCompositeIsMissing_SDLDFT -> "(CM)" MissingParam_SDLByParamCompositeLink_SDLDFT -> "(LMP)" WrongParamType_SDLByParamCompositeLink_SDLDFT -> "(LWPT)" UnknownComposite_SDLByParamCompositeLink_SDLDFT -> "(LUC)" SDLReferentialCycle_SDLDFT -> "(CC)" ErrornousSDL_SDLDFT -> "(ES)" UnsupportedMarker_P2TET -> "UM" NoValueForParameter_P2TET -> "NV" UnderAccordingParamReparsingFailure_P2TET -> "RF" ReparsingDepthMaxReached_P2TET -> "RDM" ReparsingLengthMaxReached_P2TET -> "RLM" InstaniationLengthMaxReached_P2TET -> "ILM"
includeAsAnError :: PCLT_InnerConfig -> PCSI2Text_Error -> String -> (ByteString, ForInstaniationUsedChunkLength)Source
Whenever representation generator can't make representation
for a template due to some error, it puts there (instead of representation)
an error marking (pcsMarkingErrorPlaceholderWrapper
) with an abbreviation (see shortOf_PCSI2Text_Error
)
of error type and template ID.
givenSDL_statisfies :: ShowDetalizationLevel -> PCSI -> PCLT_ShowDetalizationLevel -> PCLT_CatalogMap -> Either SDL_DeterminationFailure BoolSource
A test, if a given reciever's detalization level is enough
to represent a given PCSI
.
pcsi2new_text :: PCSI -> (ShowDetalizationLevel, LanguageName) -> PCLT_Catalog -> (StdOut_CLBS, [ErrorWithPCSCatalog PCSI2Text_Error])Source
Wrapper around pcsi2text
for cases, when new CLBS
for output
is to be created. It's maximal length is set to be same
as configured in parameter pcsInstaniationResultMaxSize
pcsi2text :: StdOut_CLBS -> PCSI -> (ShowDetalizationLevel, LanguageName) -> PCLT_Catalog -> (StdOut_CLBS, [ErrorWithPCSCatalog PCSI2Text_Error])Source