Qual è la differenza tra System.Exception vs System.SystemExceptionSystem.Exception vs System.SystemException
risposta
Ecco, questo potrebbe aiutare: Difference Between Application Exception and System Exception
SystemException fornito come un mezzo per distinguere tra eccezioni definite dal sistema rispetto alle eccezioni definite dalle applicazioni.
Haha, la tua modifica dice esattamente quale sia la mia risposta. :) –
Non ho visto la tua risposta – ata
Dai uno sguardo allo here.
In breve, System.Exception
è definito dalle applicazioni e System.SystemException
è definito dal sistema (.NET Framework).
Un SystemException è in genere riservato per .NET runtime/framework da utilizzare e non il codice dell'applicazione. Fondamentalmente, non derivare da SystemException quando si crea la propria classe Exception personalizzata.
Se si creano le proprie classi di eccezioni, è necessario derivarle da Exception o ApplicationException. Originariamente, ApplicationException era destinato a essere utilizzato per eccezioni non-framework, ma è caduto sul ciglio della strada. Credo che gli autori di framework ora raccomandino di ricavare le eccezioni personalizzate dalla classe Exception di base.
- 1. F # groupBy - System.Exception: metodo non riconosciuta chiamata
- 2. Perché le eccezioni di rete vengono generate da Windows.Web.Http.HttpClient di tipo System.Exception invece di qualcosa di più specifico?
- 3. ID vs UniqueID vs ClientID vs UniqueClientID vs StaticClientID?
- 4. VS 2008 vs VS 2008 Express
- 5. .NET vs ASP.NET vs CLR vs ASP
- 6. Atomikos vs JOTM vs Bitronix vs?
- 7. Accumulare vs piega vs ridurre vs comprimere
- 8. ACE vs Boost vs Poco vs wxWidgets
- 9. VS 2013 MSTest vs nUnit vs xUnit
- 10. control.BeginInvoke() Vs Dispatcher Vs SynchronizationContext Vs .. - AFFIDABILITÀ
- 11. Exec vs ExecWait vs ExecShell vs nsExec :: Exec vs nsExec :: ExecToLog vs nsExec :: ExecToStack vs ExecDos vs ExeCmd
- 12. bigtable vs cassandra vs simpledb vs dynamo vs couchdb vs hypertable vs riak vs hbase, cosa hanno in comune?
- 13. e vs * e | vs +
- 14. SpiderMonkey vs JavaScriptCore vs?
- 15. * vs ** vs *** in Proguard?
- 16. Le migliori pratiche per la cattura e gettando l'eccezione
- 17. bundler vs RVM vs gemme vs RubyGems vs gemsets vs system ruby
- 18. Misurare il tempo in Linux - tempo vs orologio vs getrusage vs clock_gettime vs gettimeofday vs timespec_get?
- 19. innerText vs innerHtml vs label vs text vs textContent vs outerText
- 20. Mathematica: non valutata vs Defer vs attesa vs HoldForm vs HoldAllComplete vs etc etc
- 21. Iterator vs. Reference vs. pointer
- 22. Selenium vs. SimpleTest vs. WatiN
- 23. BasicHttpBinding vs WsHttpBinding vs webHttpBinding
- 24. Boo vs C# vs Python?
- 25. StringBuffer vs StringBuilder Vs StringTokenizer
- 26. JSF vs Facelets vs JSP
- 27. Qcodo vs. CakePHP vs. Zend
- 28. select vs poll vs epoll
- 29. RazorEngine vs RazorTemplates vs RazorMachine
- 30. cudaStreamSynchronize vs CudaDeviceSynchronize vs cudaThreadSynchronize
@SeanBright Mi piace come, due anni dopo, trovo questa domanda SO nella parte superiore dei risultati di ricerca di Google per quella stessa cosa, – cost