Skip to content

Commit

Permalink
feat: added flutter crash now reporting method
Browse files Browse the repository at this point in the history
  • Loading branch information
ndesai-newrelic committed Jan 8, 2025
1 parent 7dc0f25 commit fd01958
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ freshnessValidatedDate: 2023-07-20
React Native
</TabsBarItem>

<TabsBarItem id="flutter">
Flutter
</TabsBarItem>

<TabsBarItem id="unity">
Unity
</TabsBarItem>
Expand Down Expand Up @@ -249,6 +253,62 @@ crashNow(options?: { message: string; } | undefined) => void
```typescript
NewRelicCapacitorPlugin.crashNow();
NewRelicCapacitorPlugin.crashNow({ message: "A demo crash message" });
```
</TabsPageItem>

<TabsPageItem id="flutter">
## Syntax [#syntax]

```dart
crashNow({String name}) : void ;
```

## Description [#description]

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

## Parameters [#parameters]

<table>
<thead>
<tr>
<th width={200}>
Parameter
</th>

<th width={200}>
Type
</th>

<th>
Description
</th>
</tr>
</thead>

<tbody>
<tr>
<td>
`name`
</td>

<td>
`string`
</td>

<td>
Optional. A message attached to the exception.
</td>
</tr>
</tbody>
</table>

## Example [#example]

```dart
NewrelicMobile.instance.crashNow(name: "This is a crash");
NewrelicMobile.instance.crashNow();
```
</TabsPageItem>

Expand Down
7 changes: 7 additions & 0 deletions src/data/attribute-dictionary.json
Original file line number Diff line number Diff line change
Expand Up @@ -7277,6 +7277,7 @@
"definition": "<p>The last interaction before a crash or harvest event, if one is present.</p>\n",
"events": [
"Mobile",
"MobileApplicationExit",
"MobileCrash",
"MobileHandledException",
"MobileRequest",
Expand Down Expand Up @@ -7686,6 +7687,7 @@
"definition": "<p>The last interaction before a crash or harvest event, if one is present.</p>\n",
"events": [
"Mobile",
"MobileApplicationExit",
"MobileCrash",
"MobileHandledException",
"MobileRequest",
Expand Down Expand Up @@ -8326,6 +8328,7 @@
"definition": "<p>The last interaction before a crash or harvest event, if one is present.</p>\n",
"events": [
"Mobile",
"MobileApplicationExit",
"MobileCrash",
"MobileHandledException",
"MobileRequest",
Expand Down Expand Up @@ -9046,6 +9049,7 @@
"definition": "<p>The last interaction before a crash or harvest event, if one is present.</p>\n",
"events": [
"Mobile",
"MobileApplicationExit",
"MobileCrash",
"MobileHandledException",
"MobileRequest",
Expand Down Expand Up @@ -9620,6 +9624,7 @@
"definition": "<p>The last interaction before a crash or harvest event, if one is present.</p>\n",
"events": [
"Mobile",
"MobileApplicationExit",
"MobileCrash",
"MobileHandledException",
"MobileRequest",
Expand Down Expand Up @@ -10268,6 +10273,7 @@
"definition": "<p>The last interaction before a crash or harvest event, if one is present.</p>\n",
"events": [
"Mobile",
"MobileApplicationExit",
"MobileCrash",
"MobileHandledException",
"MobileRequest",
Expand Down Expand Up @@ -10899,6 +10905,7 @@
"definition": "<p>The last interaction before a crash or harvest event, if one is present.</p>\n",
"events": [
"Mobile",
"MobileApplicationExit",
"MobileCrash",
"MobileHandledException",
"MobileRequest",
Expand Down

0 comments on commit fd01958

Please sign in to comment.