uCalc API Version: 5.7.0-preview.1 Released: 7/30/2026

Warning

uCalc API Preview Release Notice:This preview documentation describes the intended behavior of the API. It is not fully accurate or complete.The current preview build contains incomplete features, unoptimized performance, and is subject to breaking changes.Use of the preview version in your production code is not recommended.

GetMessage

Method

Product: 

Class: 

Retrieves the descriptive message for a specific error code.

Syntax

GetMessage(ErrorCode)

Parameters

errCode
ErrorCode
Enum member to retrieve a specific error message.

Return

string

The error message as a string. Returns "No error" if no error has occurred or if the specified errorId is ErrorCode::None.

Remarks

When called with an enum member, like uc.ErrorMessage(ErrorCode.Syntax_Error), it returns the generic, built-in message for that specific error code, regardless of what the last error was. This is useful for building custom error displays or documentation.

Examples

GetMessage

ID: 802

See: GetMessage
				
					using uCalcSoftware;

var uc = new uCalc();
Console.WriteLine(uc.Error.GetMessage(ErrorCode.Syntax_Error));
Console.WriteLine(uc.Error.GetMessage(ErrorCode.FloatOverflow));
				
			
Syntax error
Floating point overflow
				
					#include <iostream>
#include "uCalc.h"

using namespace std;
using namespace uCalcSoftware;

int main() {
   uCalc uc;
   cout << uc.Error().GetMessage(ErrorCode::Syntax_Error) << endl;
   cout << uc.Error().GetMessage(ErrorCode::FloatOverflow) << endl;
}
				
			
Syntax error
Floating point overflow
				
					Imports System
Imports uCalcSoftware
Public Module Program
   Public Sub Main()
      Dim uc As New uCalc()
      Console.WriteLine(uc.Error.GetMessage(ErrorCode.Syntax_Error))
      Console.WriteLine(uc.Error.GetMessage(ErrorCode.FloatOverflow))
   End Sub
End Module
				
			
Syntax error
Floating point overflow