java虛擬機器學習異常篇一

來源:互聯網
上載者:User

虛擬機器產生異常的原由與處理
產生原因:1。由於不正常的語句背虛擬機器檢測到。拋出異常在語句執行點。可能情況有:違反語義的操作如數組過界;資源越界;串連程式時出錯
 2。java代碼執行throws語句
 3。非同步異常:ThreadGroup的stop()方法調用與虛擬機器內部發生錯誤。
處理異常:封閉try內部代碼轉到靠try最近的catch語句中,在沒有catch語句情況下該線程停止,只有finnaly語句執行;並且當其線程父類
 ThreadGroup調用unCatchedException後才終止該線程。
異常分類:(java.lang下)
        Exception:
 AclNotFoundException, ActivationException, AlreadyBoundException, ApplicationException,
 AWTException, BackingStoreException, BadLocationException, CertificateException, ClassNotFoundException,
 CloneNotSupportedException, DataFormatException, DestroyFailedException, ExpandVetoException,
 FontFormatException, GeneralSecurityException, GSSException, IllegalAccessException,
 InstantiationException, InterruptedException, IntrospectionException, InvalidMidiDataException,
 InvalidPreferencesFormatException, InvocationTargetException, IOException, LastOwnerException,
 LineUnavailableException, MidiUnavailableException, MimeTypeParseException, NamingException,
 NoninvertibleTransformException, NoSuchFieldException, NoSuchMethodException, NotBoundException,
 NotOwnerException, ParseException, ParserConfigurationException, PrinterException, PrintException,
 PrivilegedActionException, PropertyVetoException, RefreshFailedException, RemarshalException,
 RuntimeException, SAXException, ServerNotActiveException, SQLException, TooManyListenersException,
 TransformerException, UnsupportedAudioFileException, UnsupportedCallbackException,
 UnsupportedFlavorException, UnsupportedLookAndFeelException, URISyntaxException,
 UserException, XAException
 其中不受檢測的運行期異常類:RuntimeException類
 ArithmeticException, ArrayStoreException, BufferOverflowException, BufferUnderflowException,
 CannotRedoException, CannotUndoException, ClassCastException, CMMException,
 ConcurrentModificationException, DOMException, EmptyStackException, IllegalArgumentException,
 IllegalMonitorStateException, IllegalPathStateException, IllegalStateException, ImagingOpException,
 IndexOutOfBoundsException, MissingResourceException, NegativeArraySizeException, NoSuchElementException,
 NullPointerException, ProfileDataException, ProviderException, RasterFormatException, SecurityException,
 SystemException, UndeclaredThrowableException, UnmodifiableSetException, UnsupportedOperationException

 Error:
 AssertionError, AWTError, CoderMalfunctionError, FactoryConfigurationError, LinkageError, ThreadDeath,
 TransformerFactoryConfigurationError, VirtualMachineError

(未完)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.