RealDocs

UKismetSystemLibrary::RaiseScriptError

function Engine Blueprint Since unknown
#include "Kismet/KismetSystemLibrary.h"
Access: public Specifiers: staticUFUNCTIONBlueprintCallable

Description

Raises a Blueprint exception with the given message, logged to the Output and Message Log with information about where it was raised.

Caveats & Gotchas

  • Marked DevelopmentOnly — this is compiled out entirely in Test and Shipping builds (guarded by `#if !(UE_BUILD_TEST || UE_BUILD_SHIPPING)`), so it must never be relied on for runtime error handling that needs to occur in a shipped game.
  • In the editor it throws a Blueprint exception via FBlueprintCoreDelegates::ThrowScriptException (visible in the Blueprint debugger); in non-editor development builds it only logs an error and stack trace instead — behaviour differs by build configuration, not just by whether it compiles out.

Signature

static void RaiseScriptError(const FString& ErrorMessage = FString(TEXT("An error occurred")))

Parameters

Name Type Description Default
ErrorMessage const FString& The error message to display. "An error occurred"

Return Type

void

Example

Raise a custom Blueprint error C++
if (!TargetActor)
{
    UKismetSystemLibrary::RaiseScriptError(TEXT("TargetActor was null in AbilityActivation"));
    return;
}

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.