APIs, concepts, guides, and more
Error Logging

Utilize error logging to record and trace errors in RMP objects, aiding in debugging and ensuring efficient problem resolution during code execution.

🔹 What is Error Logging?

Error logs record RSIObjects errors that occur during the execution of code so you can target problems when debugging.

🔹 Error Logging Overview

All RSIObjects have error logs. This utility helps to trace errors when a program fails and aids in debugging.

Observe the below sample code to learn how to catch and display error logs.

📜 Sample Code

  • C#

    // Turn off exceptions. Exceptions will be logged as RsiError objects.
    axis.ThrowExceptions(false);
    // Do something that will cause an error (zero acceleration).
    axis.MoveVelocity(0.0, 0.0);
    while (axis.ErrorLogCountGet() > 0)
    {
    RsiError error = axis.ErrorLogGet();
    Console.WriteLine(error.Message);
    }