Header menu logo fantomas

DiagnosticsLogger Module

Types and nested modules

Type/Module Description

BuildPhaseSubcategory

Literal build phase subcategory strings.

DiagnosticsLoggerExtensions

MultipleDiagnosticsLoggers

OperationResult

BuildPhase

Closed enumeration of build phases.

CapturingDiagnosticsLogger

Represents a DiagnosticsLogger that captures all diagnostics, optionally formatting them eagerly.

CompilationGlobalsScope

This represents the global state established as each task function runs as part of the build. Use to reset error and warning handlers.

Deprecated

DiagnosticEnabledWithLanguageFeature

A diagnostic that is raised when enabled manually, or by default with a language feature

DiagnosticStyle

Represents the style being used to format errors

DiagnosticWithSuggestions

DiagnosticWithText

Represents a diagnostic exeption whose text comes via SR.*

DiagnosticsLogger

Represents a capability to log diagnostics

DiagnosticsThreadStatics

Thread statics for the installed diagnostic logger

Exiter

Represnts an early exit from parsing, checking etc, for example because 'maxerrors' has been reached.

Experimental

ImperativeOperationResult

InternalError

InternalException

LibraryUseOnly

OperationResult<'T>

The result type of a computational modality to collect warnings and possibly fail

PhasedDiagnostic

PossibleUnverifiableCode

ReportedError

Thrown when immediate, local error recovery is not possible. This indicates we've reported an error but need to make a non-local transfer of control. Error recovery may catch this and continue (see 'errorRecovery') The exception that caused the report is carried as data because in some situations (LazyWithContext) we may need to re-report the original error when a lazy thunk is re-evaluated.

StackGuard

StopProcessingExiter

An exiter that raises StopProcessingException if Exit is called, saving the exit code in ExitCode.

StopProcessingExn

Thrown when we stop processing the F# Interactive entry or #load.

Suggestions

SuppressLanguageFeatureCheck

Indicates whether a language feature check should be skipped. Typically used in recursive functions where we don't want repeated recursive calls to raise the same diagnostic multiple times.

TrackErrorsBuilder

UnresolvedPathReference

UnresolvedPathReferenceNoRange

UnresolvedReferenceError

UnresolvedReferenceNoRange

UserCompilerMessage

WrappedError

Thrown when we want to add some range information to a .NET exception

Functions and values

Function or value Description

AssertFalseDiagnosticsLogger

Full Usage: AssertFalseDiagnosticsLogger

Returns: DiagnosticsLogger

Represents a DiagnosticsLogger that ignores diagnostics and asserts

Returns: DiagnosticsLogger

AtLeastOne2D f xs ys

Full Usage: AtLeastOne2D f xs ys

Parameters:
Returns: OperationResult<bool>
Modifiers: inline
Type parameters: 'T, 'b
f : 'T -> 'b -> OperationResult<bool>
xs : 'T list
ys : 'b list
Returns: OperationResult<bool>

AtLeastOneD f l

Full Usage: AtLeastOneD f l

Parameters:
Returns: OperationResult<bool>
Modifiers: inline
Type parameters: 'T
f : 'T -> OperationResult<bool>
l : 'T list
Returns: OperationResult<bool>

AttachRange m exn

Full Usage: AttachRange m exn

Parameters:
Returns: exn
m : range
exn : exn
Returns: exn

CheckNoErrorsAndGetWarnings res

Full Usage: CheckNoErrorsAndGetWarnings res

Parameters:
Returns: (exn list * 'T) option
res : OperationResult<'T>
Returns: (exn list * 'T) option

CommitOperationResult res

Full Usage: CommitOperationResult res

Parameters:
Returns: 'T
res : OperationResult<'T>
Returns: 'T

CompleteD

Full Usage: CompleteD

Returns: OperationResult<unit>
Returns: OperationResult<unit>

DiscardErrorsLogger

Full Usage: DiscardErrorsLogger

Returns: DiagnosticsLogger

Represents a DiagnosticsLogger that discards diagnostics

Returns: DiagnosticsLogger

Error (arg1, arg2)

Full Usage: Error (arg1, arg2)

Parameters:
    arg0 : int * string
    arg1 : range

Returns: exn

Creates a diagnostic exeption whose text comes via SR.*

arg0 : int * string
arg1 : range
Returns: exn

ErrorD err

Full Usage: ErrorD err

Parameters:
    err : exn

Returns: OperationResult<'T>
Modifiers: inline
Type parameters: 'T
err : exn
Returns: OperationResult<'T>

ErrorEnabledWithLanguageFeature (arg1, arg2, arg3)

Full Usage: ErrorEnabledWithLanguageFeature (arg1, arg2, arg3)

Parameters:
    arg0 : int * string
    arg1 : range
    arg2 : bool

Returns: exn

Creates a DiagnosticEnabledWithLanguageFeature whose text comes via SR.*

arg0 : int * string
arg1 : range
arg2 : bool
Returns: exn

ErrorWithSuggestions (arg1, arg2, arg3, arg4)

Full Usage: ErrorWithSuggestions (arg1, arg2, arg3, arg4)

Parameters:
Returns: exn

Creates a DiagnosticWithSuggestions whose text comes via SR.*

arg0 : int * string
arg1 : range
arg2 : string
arg3 : Suggestions
Returns: exn

Iterate2D f xs ys

Full Usage: Iterate2D f xs ys

Parameters:
Returns: OperationResult<unit>

Stop on first error. Accumulate warnings and continue.

f : 'T -> 'b -> OperationResult<unit>
xs : 'T list
ys : 'b list
Returns: OperationResult<unit>

IterateD f xs

Full Usage: IterateD f xs

Parameters:
Returns: OperationResult<unit>

Stop on first error. Accumulate warnings and continue.

f : 'T -> OperationResult<unit>
xs : 'T list
Returns: OperationResult<unit>

IterateIdxD f xs

Full Usage: IterateIdxD f xs

Parameters:
Returns: OperationResult<unit>
f : int -> 'T -> OperationResult<unit>
xs : 'T list
Returns: OperationResult<unit>

MapD f xs

Full Usage: MapD f xs

Parameters:
Returns: OperationResult<'b list>
f : 'T -> OperationResult<'b>
xs : 'T list
Returns: OperationResult<'b list>

MapReduce2D mapper zero reducer xs ys

Full Usage: MapReduce2D mapper zero reducer xs ys

Parameters:
    mapper : 'T -> 'T2 -> OperationResult<'c>
    zero : 'c
    reducer : 'c -> 'c -> 'c
    xs : 'T list
    ys : 'T2 list

Returns: OperationResult<'c>
Modifiers: inline
Type parameters: 'T, 'T2, 'c
mapper : 'T -> 'T2 -> OperationResult<'c>
zero : 'c
reducer : 'c -> 'c -> 'c
xs : 'T list
ys : 'T2 list
Returns: OperationResult<'c>

MapReduceD mapper zero reducer l

Full Usage: MapReduceD mapper zero reducer l

Parameters:
    mapper : 'T -> OperationResult<'b>
    zero : 'b
    reducer : 'b -> 'b -> 'b
    l : 'T list

Returns: OperationResult<'b>
Modifiers: inline
Type parameters: 'T, 'b
mapper : 'T -> OperationResult<'b>
zero : 'b
reducer : 'b -> 'b -> 'b
l : 'T list
Returns: OperationResult<'b>

NewlineifyErrorString message

Full Usage: NewlineifyErrorString message

Parameters:
    message : string

Returns: string
message : string
Returns: string

NoSuggestions

Full Usage: NoSuggestions

Returns: Suggestions
Returns: Suggestions

NormalizeErrorString text

Full Usage: NormalizeErrorString text

Parameters:
    text : string

Returns: string

fixes given string by replacing all control chars with spaces. NOTE: newlines are recognized and replaced with stringThatIsAProxyForANewlineInFlatErrors (ASCII 29, the 'group separator'), which is decoded by the IDE with 'NewlineifyErrorString' back into newlines, so that multi-line errors can be displayed in QuickInfo

text : string
Returns: string

OptionD f xs

Full Usage: OptionD f xs

Parameters:
Returns: OperationResult<unit>
f : 'T -> OperationResult<unit>
xs : 'T option
Returns: OperationResult<unit>

QuitProcessExiter

Full Usage: QuitProcessExiter

Returns: Exiter

An exiter that quits the process if Exit is called.

Returns: Exiter

RaiseOperationResult res

Full Usage: RaiseOperationResult res

Parameters:
res : OperationResult<unit>

RepeatWhileD nDeep body

Full Usage: RepeatWhileD nDeep body

Parameters:
Returns: OperationResult<unit>
nDeep : int
body : int -> OperationResult<bool>
Returns: OperationResult<unit>

ReportWarnings warns

Full Usage: ReportWarnings warns

Parameters:
    warns : 'a list

warns : 'a list

ResultD x

Full Usage: ResultD x

Parameters:
    x : 'T

Returns: OperationResult<'T>
Modifiers: inline
Type parameters: 'T
x : 'T
Returns: OperationResult<'T>

SetThreadBuildPhaseNoUnwind phase

Full Usage: SetThreadBuildPhaseNoUnwind phase

Parameters:
phase : BuildPhase

SetThreadDiagnosticsLoggerNoUnwind diagnosticsLogger

Full Usage: SetThreadDiagnosticsLoggerNoUnwind diagnosticsLogger

Parameters:
diagnosticsLogger : DiagnosticsLogger

StopProcessing

Full Usage: StopProcessing

Returns: exn
Returns: exn

TryD f g

Full Usage: TryD f g

Parameters:
Returns: OperationResult<'T>
f : unit -> OperationResult<'T>
g : exn -> OperationResult<'T>
Returns: OperationResult<'T>

UseBuildPhase phase

Full Usage: UseBuildPhase phase

Parameters:
Returns: IDisposable

NOTE: The change will be undone when the returned "unwind" object disposes

phase : BuildPhase
Returns: IDisposable

UseDiagnosticsLogger newLogger

Full Usage: UseDiagnosticsLogger newLogger

Parameters:
Returns: IDisposable
newLogger : DiagnosticsLogger
Returns: IDisposable

UseTransformedDiagnosticsLogger transformer

Full Usage: UseTransformedDiagnosticsLogger transformer

Parameters:
Returns: IDisposable

NOTE: The change will be undone when the returned "unwind" object disposes

transformer : DiagnosticsLogger -> DiagnosticsLogger
Returns: IDisposable

WarnD err

Full Usage: WarnD err

Parameters:
    err : exn

Returns: OperationResult<unit>
Modifiers: inline
err : exn
Returns: OperationResult<unit>

WhileD gd body

Full Usage: WhileD gd body

Parameters:
Returns: OperationResult<unit>
gd : unit -> bool
body : unit -> OperationResult<unit>
Returns: OperationResult<unit>

bind f res

Full Usage: bind f res

Parameters:
Returns: OperationResult<'b>
Modifiers: inline
Type parameters: 'T, 'b

The bind in the monad. Stop on first error. Accumulate warnings and continue. Not meant for direct usage. Used in other inlined functions

f : 'T -> OperationResult<'b>
res : OperationResult<'T>
Returns: OperationResult<'b>

checkLanguageFeatureAndRecover langVersion langFeature m

Full Usage: checkLanguageFeatureAndRecover langVersion langFeature m

Parameters:
langVersion : LanguageVersion
langFeature : LanguageFeature
m : range

checkLanguageFeatureError langVersion langFeature m

Full Usage: checkLanguageFeatureError langVersion langFeature m

Parameters:
langVersion : LanguageVersion
langFeature : LanguageFeature
m : range

conditionallySuppressErrorReporting cond f

Full Usage: conditionallySuppressErrorReporting cond f

Parameters:
    cond : bool
    f : unit -> 'T

Returns: 'T
cond : bool
f : unit -> 'T
Returns: 'T

deprecatedOperator m

Full Usage: deprecatedOperator m

Parameters:
m : range

deprecatedWithError s m

Full Usage: deprecatedWithError s m

Parameters:
s : string
m : range

diagnosticSink (diagnostic, severity)

Full Usage: diagnosticSink (diagnostic, severity)

Parameters:

error exn

Full Usage: error exn

Parameters:
    exn : exn

Returns: 'T

Reports an error and raises a ReportedError exception

exn : exn
Returns: 'T

errorR exn

Full Usage: errorR exn

Parameters:
    exn : exn

Reports an error diagnostic and continues

exn : exn

errorRecovery exn m

Full Usage: errorRecovery exn m

Parameters:
exn : exn
m : range

errorRecoveryNoRange exn

Full Usage: errorRecoveryNoRange exn

Parameters:
    exn : exn

exn : exn

errorSink diagnostic

Full Usage: errorSink diagnostic

Parameters:
diagnostic : PhasedDiagnostic

findOriginalException err

Full Usage: findOriginalException err

Parameters:
    err : exn

Returns: exn
err : exn
Returns: exn

informationalWarning exn

Full Usage: informationalWarning exn

Parameters:
    exn : exn

Reports an informational diagnostic

exn : exn

languageFeatureError langVersion langFeature m

Full Usage: languageFeatureError langVersion langFeature m

Parameters:
Returns: exn
langVersion : LanguageVersion
langFeature : LanguageFeature
m : range
Returns: exn

languageFeatureNotSupportedInLibraryError langFeature m

Full Usage: languageFeatureNotSupportedInLibraryError langFeature m

Parameters:
Returns: 'T
langFeature : LanguageFeature
m : range
Returns: 'T

libraryOnlyError m

Full Usage: libraryOnlyError m

Parameters:
m : range

libraryOnlyWarning m

Full Usage: libraryOnlyWarning m

Parameters:
m : range

mlCompatError s m

Full Usage: mlCompatError s m

Parameters:
s : string
m : range

mlCompatWarning s m

Full Usage: mlCompatWarning s m

Parameters:
s : string
m : range

protectAssemblyExploration dflt f

Full Usage: protectAssemblyExploration dflt f

Parameters:
    dflt : 'T
    f : unit -> 'T

Returns: 'T
Modifiers: inline
Type parameters: 'T
dflt : 'T
f : unit -> 'T
Returns: 'T

protectAssemblyExplorationF dflt f

Full Usage: protectAssemblyExplorationF dflt f

Parameters:
    dflt : string * string -> 'T
    f : unit -> 'T

Returns: 'T
Modifiers: inline
Type parameters: 'T
dflt : string * string -> 'T
f : unit -> 'T
Returns: 'T

protectAssemblyExplorationNoReraise dflt1 dflt2 f

Full Usage: protectAssemblyExplorationNoReraise dflt1 dflt2 f

Parameters:
    dflt1 : 'T
    dflt2 : 'T
    f : unit -> 'T

Returns: 'T
Modifiers: inline
Type parameters: 'T
dflt1 : 'T
dflt2 : 'T
f : unit -> 'T
Returns: 'T

simulateError diagnostic

Full Usage: simulateError diagnostic

Parameters:
Returns: 'T
diagnostic : PhasedDiagnostic
Returns: 'T

stopProcessingRecovery exn m

Full Usage: stopProcessingRecovery exn m

Parameters:
exn : exn
m : range

stringThatIsAProxyForANewlineInFlatErrors

Full Usage: stringThatIsAProxyForANewlineInFlatErrors

Returns: String
Returns: String

suppressErrorReporting f

Full Usage: suppressErrorReporting f

Parameters:
    f : unit -> 'T

Returns: 'T
f : unit -> 'T
Returns: 'T

trackErrors

Full Usage: trackErrors

Returns: TrackErrorsBuilder

tryCheckLanguageFeatureAndRecover langVersion langFeature m

Full Usage: tryCheckLanguageFeatureAndRecover langVersion langFeature m

Parameters:
Returns: bool
langVersion : LanguageVersion
langFeature : LanguageFeature
m : range
Returns: bool

tryLanguageFeatureErrorOption langVersion langFeature m

Full Usage: tryLanguageFeatureErrorOption langVersion langFeature m

Parameters:
Returns: exn option
langVersion : LanguageVersion
langFeature : LanguageFeature
m : range
Returns: exn option

warnSink diagnostic

Full Usage: warnSink diagnostic

Parameters:
diagnostic : PhasedDiagnostic

warning exn

Full Usage: warning exn

Parameters:
    exn : exn

Reports a warning diagnostic

exn : exn

Active patterns

Active pattern Description

(|StopProcessing|_|) exn

Full Usage: (|StopProcessing|_|) exn

Parameters:
    exn : exn

Returns: unit voption
exn : exn
Returns: unit voption

Type something to start searching.