nuget server logo nuget api documents
↑

API Docs / REnv / debug

debug

Full name SMRUCC.Rsharp.Runtime.Internal.debug Assembly REnv Members 13

01 Syntax

SMRUCC.Rsharp.Runtime.Internal.debug

02 Methods

NameOverloadsSummary
write 1 只在debug.verbose啰嗦模式下才会工作
stop 1 Create an error message to populate to the upper environment.
getEnvironmentStack 1 get a stackframe list of current environment traceback
CreateMessageInternal 1 Create R# internal message
CastCLRExceptionMessage 1 convert the .NET exception as the R# runtime error message.
PrintRExceptionStackTrace 1 print the stacktrace as string for a given .NET exception object
PrintRStackTrace 1 print the stacktrace as string for a given R# exception message object.
PrintWarningMessages 1 print the given warning message
PrintMessageInternal 1 return 500 error code
writeErrMessage 1 write error message to the output printer device
getMessagePrefix 1 get message prefix based on the Message.level
getMessageColor 1 get message color based on the Message.level

03 Properties

NameOverloadsSummary
verbose 1 啰嗦模式下会输出一些调试信息

04 Members

method write #
write(String, ConsoleColor)

只在debug.verbose啰嗦模式下才会工作

Parameters
NameTypeDescription
message$String

-

colorConsoleColor

-

method stop #
stop(Object, Environment, Boolean, Nullable(Of Boolean))

Create an error message to populate to the upper environment.

Parameters
NameTypeDescription
messageObject

the message content, value of this parameter could be a string character data, a string vector or a .NET exception object.

envirEnvironment

the environment source stack of the current exception happended.

suppressBoolean

this parameter indicated that the R environment should not throw the exception when running in debug mode.

suppress_logNullable(Of Boolean)

suppress write the internal error log file? this parameter is useful when the error stop happends inside a loop. if not suppress write the error log, then a log file in huge size may produced!

Returns

a generated error message

method getEnvironmentStack #
getEnvironmentStack(Environment)

get a stackframe list of current environment traceback

Parameters
NameTypeDescription
parentEnvironment

the parent enviroment traceback

method CreateMessageInternal #
CreateMessageInternal(Object, Environment, MSG_TYPES)

Create R# internal message

Parameters
NameTypeDescription
messagesObject

-

envirEnvironment

-

levelMSG_TYPES

The message level

method CastCLRExceptionMessage #
CastCLRExceptionMessage(Exception, Environment)

convert the .NET exception as the R# runtime error message.

Parameters
NameTypeDescription
exException

-

envirEnvironment

-

method PrintRExceptionStackTrace #
PrintRExceptionStackTrace(ExceptionData)

print the stacktrace as string for a given .NET exception object

Parameters
NameTypeDescription
errExceptionData

-

method PrintRStackTrace #
PrintRStackTrace(StackFrame())

print the stacktrace as string for a given R# exception message object.

Parameters
NameTypeDescription
stacktraceStackFrame()

-

method PrintWarningMessages #
PrintWarningMessages(IEnumerable(Of Message), GlobalEnvironment, Boolean)

print the given warning message

Parameters
NameTypeDescription
warningsIEnumerable(Of Message)

a list of warning message

globalEnvGlobalEnvironment

-

allBoolean

-

method PrintMessageInternal #
PrintMessageInternal(Message, GlobalEnvironment)

return 500 error code

Parameters
NameTypeDescription
messageMessage

-

globalEnvGlobalEnvironment

这个参数可以为空,空值的时候会默认将消息打印在标准输出

Returns

this function will returns 500 error code

method writeErrMessage #
writeErrMessage(Message, TextWriter, Boolean)

write error message to the output printer device

Remarks

parameter redirectError2stdout only works when the parameter stdout is not nothing

Parameters
NameTypeDescription
messageMessage

-

stdoutTextWriter

the output printer device

redirectError2stdoutBoolean

message data will be print to the App.StdErr autoamtically if this parameter value is set to FALSE by default, otherwise the error message will be print to stdout if set this parameter value TRUE.

method getMessagePrefix #
getMessagePrefix(Message)

get message prefix based on the Message.level

Parameters
NameTypeDescription
messageMessage

-

method getMessageColor #
getMessageColor(Message)

get message color based on the Message.level

Parameters
NameTypeDescription
messageMessage

-

property verbose #
verbose

啰嗦模式下会输出一些调试信息