• EnglishEspañol日本語한국어Português
  • Log inStart now

Test crash reporting

Syntax

Java

NewRelic.crashNow(string $message)

Kotlin

NewRelic.crashNow(message:String!)

Description

Throws a demo run-time exception named java.lang.RuntimeException to test New Relic crash reporting.

With this method, you can throw a demo run-time exception named java.lang.RuntimeException with a message. This crash will appear in the Crash Analysis page.

Parameters

Parameter

Type

Description

$message

string

Optional. A message attached to the exception.

Example

Java

NewRelic.crashNow("This is my test message");

Kotlin

dNewRelic.crashNow("This is my test message")

Syntax

Objective-c

+ (void) crashNow:(NSString* __nullable)message;

Swift

NewRelic.crashNow()

Description

Throws a demo run-time exception named NewRelicDemoException to test New Relic crash reporting.

With this method, you can throw a demo run-time exception named NewRelicDemoException with a message. This crash will appear in the Crash analysis page.

Parameters

Parameter

Type

Description

message

string

Optional. A message attached to the exception.

Examples

Objective-C

[NewRelic crashNow:@"This is a test crash"];

Swift

NewRelic.crashNow("This is a test crash")

Syntax

crashNow(options?: { message: string; } | undefined) => void

Description

Throws a demo run-time exception to test New Relic crash reporting.

Parameters

Parameter

Type

Description

options

string

Optional. A message attached to the exception.

Example

NewRelicCapacitorPlugin.crashNow();
NewRelicCapacitorPlugin.crashNow({ message: "A demo crash message" });

Syntax

crashNow(message?: string): void;

Description

Throws a demo run-time exception to test New Relic crash reporting.

Parameters

Parameter

Type

Description

message

string

Optional. A message attached to the exception.

Example

NewRelic.crashNow();
NewRelic.crashNow("New Relic example crash message");

Syntax

CrashNow(string message = "") : void;

Description

Throws a demo run-time exception on Android/iOS to test New Relic crash reporting.

Parameters

Parameter

Type

Description

message

string

Optional. A message attached to the exception.

Example

CrossNewRelic.Current.CrashNow();

Syntax

crashNow(message?: string): void;

Description

Throws a demo run-time exception to test New Relic crash reporting.

Parameters

Parameter

Type

Description

message

string

Optional. A message attached to the exception.

Example

NewRelic.crashNow();
NewRelic.crashNow("New Relic example crash message");

Syntax

CrashNow(string message = "") : void;

Description

Throws a demo run-time exception on Unity to test New Relic crash reporting.

Parameters

Parameter

Type

Description

message

string

Optional. A message attached to the exception.

Example

NewRelicAgent.CrashNow("this is crash");

Syntax

CrashNow(string message = "") : void;

Description

Throws a demo run-time exception on Android/iOS to test New Relic crash reporting.

Parameters

Parameter

Type

Description

message

string

Optional. A message attached to the exception.

Example

CrossNewRelicClient.Current.CrashNow();
Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.