ZennoLab Assemblies Documentation
SendErrorToLog Method
See Also  Example Send Feedback
ZennoLab.InterfacesLibrary Assembly > ZennoLab.InterfacesLibrary.ProjectModel Namespace > IZennoPosterProjectModel Interface : SendErrorToLog Method
message
Type: System.String

An error message for send.

way
Type: System.String

An error "way" for send. The parameter "way" can be line in code, action ID or module.

Glossary Item Box

Send an error message to the log of ZennoPoster.

Syntax

C# 
void SendErrorToLog( 
   string message,
   string way
)

Parameters

message
Type: System.String

An error message for send.

way
Type: System.String

An error "way" for send. The parameter "way" can be line in code, action ID or module.

Remarks

The parameter "way" hasn't restrictions, it should use for specify the location where error was detected. This parameter can be empty.

Example

The following example demonstrates using SendErrorToLog method.
C#Copy Code
try
{
    // get global variable
    IGlobalVariable gv = project.GlobalVariables["MyNamespace", "MyGlobalVariable"];
}
catch (Exception e)
{
    // send error to log
    project.SendErrorToLog(e.Message, "first action OwnCode C#");
}
PHPCopy Code
try
{
    // get global variable
    $gv = $project->GlobalVariables["MyNamespace", "MyGlobalVariable"];
}
catch (Exception $e)
{
    // send error to log
    $project->SendErrorToLog($e->Message, "first action OwnCode PHP");
}

Requirements

Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows Seven

See Also

© 2013 All Rights Reserved.