Syntax
crashNow;crashNow:(NSString* __nullable)message;
Throws a demo run-time exception named NewRelicDemoException to test New Relic crash reporting.
Requirements
Requires agent version 4.83 or higher.
Description
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 | Description |
---|---|
string | Optional. A message attached to the exception. |
Examples
Method:
+ (void) crashNow:(NSString* __nullable)message;
Objective-C
Example:
[NewRelic crashNow];
Example with message:
[NewRelic crashNow:@"This is a test crash"];
Swift
Example:
NewRelic.crashNow()
Example with message:
NewRelic.crashNow("This is a test crash")
For more help
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's and and documentation.