Skip to content

Commit c7e9e8c

Browse files
authored
Merge pull request #19257 from newrelic/translations-e8eafe29
Updated translations - (machine translation)
2 parents d29406f + cc5f2ad commit c7e9e8c

File tree

9 files changed

+310
-322
lines changed

9 files changed

+310
-322
lines changed

src/i18n/content/es/docs/mobile-monitoring/new-relic-mobile/mobile-sdk/record-handled-exceptions.mdx

+77-77
Original file line numberDiff line numberDiff line change
@@ -41,30 +41,30 @@ translationType: machine
4141
### Java [#android-syntax-java]
4242

4343
```java
44-
NewRelic.recordHandledException(Exception $exceptionToHandle)
45-
NewRelic.recordHandledException(Exception $exceptionToHandle, Map of String, Object $exceptionAttributes)
44+
NewRelic.recordHandledException(Exception $exceptionToHandle)
45+
NewRelic.recordHandledException(Exception $exceptionToHandle, Map of String, Object $exceptionAttributes)
4646
```
4747

4848
```java
49-
NewRelic.recordHandledException(Throwable $throwableToHandle)
50-
NewRelic.recordHandledException(Throwable $throwableToHandle, Map of String, Object $exceptionAttributes)
49+
NewRelic.recordHandledException(Throwable $throwableToHandle)
50+
NewRelic.recordHandledException(Throwable $throwableToHandle, Map of String, Object $exceptionAttributes)
5151
```
5252

5353
### Kotlin [#android-syntax-kotlin]
5454

5555
```kotlin
56-
NewRelic.recordHandledException(
57-
exception: Exception?,
58-
exceptionAttributes: Map<String?, Any?>?
59-
)
56+
NewRelic.recordHandledException(
57+
exception: Exception?,
58+
exceptionAttributes: Map<String?, Any?>?
59+
)
6060
```
6161

6262
```kotlin
63-
NewRelic.recordHandledException(throwable: Throwable?)
64-
NewRelic. recordHandledException(
65-
throwable: Throwable?,
66-
attributes: Map<String?, Any?>?
67-
)
63+
NewRelic.recordHandledException(throwable: Throwable?)
64+
NewRelic. recordHandledException(
65+
throwable: Throwable?,
66+
attributes: Map<String?, Any?>?
67+
)
6868
```
6969

7070
## Descripción [#android-description]
@@ -136,43 +136,42 @@ translationType: machine
136136
### Java [#android-examples-java]
137137

138138
```java
139-
public class MainActivity extends Activity {
140-
...
141-
coolButton.setOnClickListener(new View.OnClickListener() {
142-
Map myMap = new HashMap<>();
143-
@Override
144-
public void onClick(View view) {
145-
try {
146-
myMap.put("Key", "Value");
147-
Integer stringVar = (Integer) myMap.get("Key"); //throws ClassCastException
148-
} catch (Exception e) {
149-
NewRelic.recordHandledException(e, myMap);
150-
}
151-
}
152-
});
153-
...
139+
public class MainActivity extends Activity {
140+
... coolButton.setOnClickListener(new View.OnClickListener() {
141+
Map myMap = new HashMap<>();
142+
@Override
143+
public void onClick(View view) {
144+
try {
145+
myMap.put("Key", "Value");
146+
Integer stringVar =
147+
(Integer) myMap.get("Key"); // throws ClassCastException
148+
} catch (Exception e) {
149+
NewRelic.recordHandledException(e, myMap);
154150
}
151+
}
152+
});
153+
...
154+
}
155155
```
156156

157157
### Kotlin [#android-examples-kotlin]
158158

159159
```kotlin
160-
161-
class MainActivity : AppCompatActivity() {
162-
163-
....
164-
binding.fab.setOnClickListener { view ->
165-
val myMap = mutableMapOf<String,Any>()
166-
try {
167-
myMap["Key"] = "Value"
168-
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
169-
.setAnchorView(R.id.fab)
170-
.setAction("Action", null).show()
171-
}catch (exception:Exception) {
172-
NewRelic.recordHandledException(exception,myMap)
173-
}
174-
}
175-
........
160+
class MainActivity : AppCompatActivity() {
161+
...
162+
binding.fab.setOnClickListener { view ->
163+
val myMap = mutableMapOf<String,Any>()
164+
try {
165+
myMap["Key"] = "Value"
166+
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
167+
.setAnchorView(R.id.fab)
168+
.setAction("Action", null).show()
169+
}catch (exception:Exception) {
170+
NewRelic.recordHandledException(exception,myMap)
171+
}
172+
}
173+
...
174+
}
176175
```
177176
</TabsPageItem>
178177

@@ -182,7 +181,7 @@ translationType: machine
182181
### C objetivo
183182

184183
```objectivec
185-
recordHandledException:(NSException* __nonnull)exception withAttributes:(NSDictionary* __nullable)attributes;
184+
recordHandledException:(NSException* __nonnull)exception withAttributes:(NSDictionary* __nullable)attributes;
186185
```
187186

188187
## Descripción [#ios-description]
@@ -256,32 +255,33 @@ translationType: machine
256255
A continuación se muestra un ejemplo de una excepción manejada simple:
257256

258257
```objectivec
259-
@try {
260-
@throw [NSException exceptionWithName:@"versionException"
261-
reason:@"App version no longer supported"
262-
userInfo:nil];
263-
} @catch (NSException* e) {
264-
[NewRelic recordHandledException:e];
265-
}
258+
try {
259+
@throw [NSException exceptionWithName:@"versionException"
260+
reason:@"App version no longer supported"
261+
userInfo:nil];
262+
} @catch (NSException* e) {
263+
[NewRelic recordHandledException:e];
264+
}
266265
```
267266

268267
Aquí hay otro ejemplo o una excepción manejada con un diccionario:
269268

270269
```objectivec
271-
NSException *exception = [NSException exceptionWithName:@"MyException" reason:@"I have my reason" userInfo:nil];
272-
273-
NSDictionary* dictionary = @{@"int": @1,
274-
@"Test Group" : @"A | B"};
275-
276-
[NewRelic recordHandledException:exception withAttributes:dictionary];
270+
NSException* exception = [NSException exceptionWithName:@"MyException"
271+
reason:@"I have my reason"
272+
userInfo:nil];
273+
274+
NSDictionary* dictionary = @{@"int" : @1, @"Test Group" : @"A | B"};
275+
276+
[NewRelic recordHandledException:exception withAttributes:dictionary];
277277
```
278278
</TabsPageItem>
279279

280280
<TabsPageItem id="maui">
281281
## Sintaxis [#maui-syntax]
282282

283283
```csharp
284-
recordError(error, StackTrace.current, attributes: attributes);
284+
recordError(error, StackTrace.current, attributes: attributes);
285285
```
286286

287287
## Descripción [#maui-description]
@@ -331,20 +331,20 @@ translationType: machine
331331
## Ejemplo [#maui-example]
332332

333333
```dart
334-
try {
335-
some_code_that_throws_error();
336-
} catch (ex) {
337-
NewrelicMobile.instance
338-
.recordError(error, StackTrace.current, attributes: attributes);
339-
}
334+
try {
335+
some_code_that_throws_error();
336+
} catch (ex) {
337+
NewrelicMobile.instance
338+
.recordError(error, StackTrace.current, attributes: attributes);
339+
}
340340
```
341341
</TabsPageItem>
342342

343343
<TabsPageItem id="unity">
344344
## Sintaxis [#unity-syntax]
345345

346346
```csharp
347-
RecordException(System.Exception exception) : void;
347+
RecordException(System.Exception exception) : void;
348348
```
349349

350350
## Descripción [#unity-description]
@@ -394,19 +394,19 @@ translationType: machine
394394
## Ejemplo [#unity-example]
395395

396396
```csharp
397-
try {
398-
some_code_that_throws_error();
399-
} catch (Exception ex) {
400-
CrossNewRelic.Current.RecordException(ex);
401-
}
397+
try {
398+
some_code_that_throws_error();
399+
} catch (Exception ex) {
400+
CrossNewRelic.Current.RecordException(ex);
401+
}
402402
```
403403
</TabsPageItem>
404404

405405
<TabsPageItem id="xamarin">
406406
## Sintaxis [#xamarin-syntax]
407407

408408
```csharp
409-
RecordException(System.Exception exception) : void;
409+
RecordException(System.Exception exception) : void;
410410
```
411411

412412
## Descripción [#xamarin-description]
@@ -456,11 +456,11 @@ translationType: machine
456456
## Ejemplo [#xamarin-example]
457457

458458
```csharp
459-
try {
460-
some_code_that_throws_error();
461-
} catch (Exception ex) {
462-
NewRelicAgent.RecordException(e);
463-
}
459+
try {
460+
some_code_that_throws_error();
461+
} catch (Exception ex) {
462+
NewRelicAgent.RecordException(e);
463+
}
464464
```
465465
</TabsPageItem>
466466
</TabsPages>

0 commit comments

Comments
 (0)