Skip to content

Commit 06b913d

Browse files
author
angelochiello
committed
Translated till Exception handling (included)
1 parent 528807f commit 06b913d

File tree

1 file changed

+23
-19
lines changed

1 file changed

+23
-19
lines changed

i18n/it-IT.md

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,13 +1532,13 @@ Nonostante questa guida speghi i *cosa*, *come* e *perché*, trovo che sia di ai
15321532
15331533
## Gestione delle eccezzioni
15341534
1535-
### decorators
1535+
### decoratori (decorator)
15361536
1537-
- Use a [decorator](https://docs.angularjs.org/api/auto/service/$provide#decorator), at config time using the [`$provide`](https://docs.angularjs.org/api/auto/service/$provide) service, on the [`$exceptionHandler`](https://docs.angularjs.org/api/ng/service/$exceptionHandler) service to perform custom actions when exceptions occur.
1537+
- Usa un [decorator](https://docs.angularjs.org/api/auto/service/$provide#decorator), al momento del config una un servizio [`$provide`](https://docs.angularjs.org/api/auto/service/$provide), sul servizio [`$exceptionHandler`](https://docs.angularjs.org/api/ng/service/$exceptionHandler) per eseguire azioni ad hoc quando l'eccezione occorre.
15381538
1539-
*Perché?*: Provides a consistent way to handle uncaught AngularJS exceptions for development-time or run-time.
1539+
*Perché?*: Fornisci un modo consistente per la gestione delle eccezioni che non trattate da AngularJS sia durante lo sviluppo che a runtime.
15401540
1541-
Nota: Another option is to override the service instead of using a decorator. This is a fine option, but if you want to keep the default behavior and extend it a decorator is recommended.
1541+
Nota: Un'altra opzione è di fare l'override del servizio invece che usare un decorator. Questa è una buona opzione ma se vuoi tenere il comportamento di default ed estenderlo un decorator è consigliato.
15421542
15431543
```javascript
15441544
/* raccomandato */
@@ -1562,23 +1562,23 @@ Nonostante questa guida speghi i *cosa*, *come* e *perché*, trovo che sia di ai
15621562
cause: cause
15631563
};
15641564
/**
1565-
* Could add the error to a service's collection,
1566-
* add errors to $rootScope, log errors to remote web server,
1567-
* or log locally. Or throw hard. It is entirely up to you.
1568-
* throw exception;
1565+
* Potresti aggiungere l'errore ad una collezione del servizio,
1566+
* aggiungere l'errore a $rootScope, fare il log degli errori ad un server web remoto,
1567+
* oppure farlo localmente. O lanciare l'eccezione solamente. Sta del tutto a te.
1568+
* lancia l'eccezione;
15691569
*/
15701570
toastr.error(exception.msg, errorData);
15711571
};
15721572
}
15731573
```
15741574
1575-
### Exception Catchers
1575+
### Ricevitore di eccezioni
15761576
1577-
- Create a factory that exposes an interface to catch and gracefully handle exceptions.
1577+
- Crea una factory che espone un'interfaccia per ricevere ee elegantemente gestire le eccezioni.
15781578
1579-
*Perché?*: Provides a consistent way to catch exceptions that may be thrown in your code (e.g. during XHR calls or promise failures).
1579+
*Perché?*: Fornisce un modo consistente di rivecere le eccezioni che possono essere lanciate nel tuo codice (p.e. durante una chiamata XHR o il fallimento di promesse).
15801580
1581-
Nota: The exception catcher is good for catching and reacting to specific exceptions from calls that you know may throw one. For example, when making an XHR call to retrieve data from a remote web service and you want to catch any exceptions from that service and react uniquely.
1581+
Nota: Il ricevitore di eccezioni è buopno per ricevere e reagire a specifiche eccezioni da chiamate che sai ne possono generare una. Per esempio, quando fai una chiamata XHR per il recupero di dati da un servizio di un server web remoto e vuoi ricevere qualsiasi eccezione da ciò e reagire univocamente.
15821582
15831583
```javascript
15841584
/* raccomandato */
@@ -1602,21 +1602,21 @@ Nonostante questa guida speghi i *cosa*, *come* e *perché*, trovo che sia di ai
16021602
}
16031603
```
16041604
1605-
### Route Errors
1605+
### Errori di routing
16061606
1607-
- Handle and log all routing errors using [`$routeChangeError`](https://docs.angularjs.org/api/ngRoute/service/$route#$routeChangeError).
1607+
- Gestisti e fai il log di tutti gli errori di routing usando [`$routeChangeError`](https://docs.angularjs.org/api/ngRoute/service/$route#$routeChangeError).
16081608
1609-
*Perché?*: Provides a consistent way handle all routing errors.
1609+
*Perché?*: Fornisce un modo consistente di gestire tutti gli errori di routing.
16101610
1611-
*Perché?*: Potentially provides a better user experience if a routing error occurs and you route them to a friendly screen with more details or recovery options.
1611+
*Perché?*: Potenzialmente fornisce una migliore esperienza all'utente se si verifica un errore di routing e li puoi indirizzare ad una schermata di aiuto o con opzioni di recupero.
16121612
16131613
```javascript
16141614
/* raccomandato */
16151615
function handleRoutingErrors() {
16161616
/**
1617-
* Route cancellation:
1618-
* On routing error, go to the dashboard.
1619-
* Provide an exit clause if it tries to do it twice.
1617+
* Annullamento del route:
1618+
* Su un errore di routing, vai alla dashboard.
1619+
* Fornisci una clausola di uscita se tenta di farlo per una seconda volta.
16201620
*/
16211621
$rootScope.$on('$routeChangeError',
16221622
function(event, current, previous, rejection) {
@@ -1627,6 +1627,10 @@ Nonostante questa guida speghi i *cosa*, *come* e *perché*, trovo che sia di ai
16271627
* Optionally log using a custom service or $log.
16281628
* (Don't forget to inject custom service)
16291629
*/
1630+
/**
1631+
* A scelta fai il log usando un servizio ad hoc o $log.
1632+
* (Non dimenticare di iniettare il servizio ad hoc)
1633+
*/
16301634
logger.warning(msg, [current]);
16311635
}
16321636
);

0 commit comments

Comments
 (0)