Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > it.comp.www.php > #22708

Re: fallback o retroazione?

From muars <abc@1123.4>
Newsgroups it.comp.www.php
Subject Re: fallback o retroazione?
Date 2019-06-27 11:28 +0200
Organization Aioe.org NNTP Server
Message-ID <qf228i$g5a$1@gioia.aioe.org> (permalink)
References <qeq0v7$lmv$1@gioia.aioe.org> <gne5odFbbheU1@mid.individual.net> <qesvid$1uv2$1@gioia.aioe.org> <gngum1F1e40U1@mid.individual.net>

Show all headers | View raw


Il 26/06/19 12:10, Alessandro Pellizzari ha scritto:
> 
> "Fallback", in inglese, significa "quello che succede quando il resto 
> non prevede questa azione".
> 
> Il try/catch serve a catturare un errore, non ad avere un comportamento 
> di default. Infatti devi specificare il tipo di eccezione che ti 
> aspetti, che può anche essere una generica "Exception", ma buona norma 
> sarebbe specificare tutti i tipi di errore che ti aspetti.
> 
> Puoi/dovresti avere catch multipli, in modo da gestire i vari tipi di 
> errore nel modo corretto (un errore di IO dal disco è diverso da un 
> errore nel decoding di un JSON), quindi qual è il "fallback"?

E c'è chi invece la intende in modo diverso (vedi il post di Sandro).
Alla fine ognuno sceglie tra le varie scuole di pensiero :)

Back to it.comp.www.php | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

fallback o retroazione? muars <abc@1123.4> - 2019-06-24 10:17 +0200
  Re: fallback o retroazione? Sandro kensan <kensan@kensan.it> - 2019-06-24 21:28 +0200
  Re: fallback o retroazione? Alessandro Pellizzari <shuriken@amiran.it> - 2019-06-25 09:53 +0100
    Re: fallback o retroazione? muars <abc@1123.4> - 2019-06-25 13:12 +0200
      Re: fallback o retroazione? Alessandro Pellizzari <shuriken@amiran.it> - 2019-06-26 11:10 +0100
        Re: fallback o retroazione? muars <abc@1123.4> - 2019-06-27 11:28 +0200

csiph-web