java.lang.System.logE()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(10.1k)|赞(0)|评价(0)|浏览(365)

本文整理了Java中java.lang.System.logE()方法的一些代码示例,展示了System.logE()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。System.logE()方法的具体详情如下:
包路径:java.lang.System
类名称:System
方法名:logE

System.logE介绍

暂无

代码示例

代码示例来源:origin: robovm/robovm

  1. public TzDataAndroid(String... paths) {
  2. for (String path : paths) {
  3. if (loadData(path)) {
  4. return;
  5. }
  6. }
  7. // We didn't find any usable tzdata on disk, so let's just hard-code knowledge of "GMT".
  8. // This is actually implemented in TimeZone itself, so if this is the only time zone
  9. // we report, we won't be asked any more questions.
  10. System.logE("Couldn't find any tzdata!");
  11. version = "missing";
  12. zoneTab = "# Emergency fallback data.\n";
  13. ids = new String[] { "GMT" };
  14. byteOffsets = rawUtcOffsets = new int[1];
  15. }

代码示例来源:origin: robovm/robovm

  1. private static void finalizerTimedOut(Object object) {
  2. // The current object has exceeded the finalization deadline; abort!
  3. String message = object.getClass().getName() + ".finalize() timed out after "
  4. + (MAX_FINALIZE_NANOS / NANOS_PER_SECOND) + " seconds";
  5. Exception syntheticException = new TimeoutException(message);
  6. // We use the stack from where finalize() was running to show where it was stuck.
  7. syntheticException.setStackTrace(FinalizerDaemon.INSTANCE.getStackTrace());
  8. Thread.UncaughtExceptionHandler h = Thread.getDefaultUncaughtExceptionHandler();
  9. if (h == null) {
  10. // If we have no handler, log and exit.
  11. System.logE(message, syntheticException);
  12. System.exit(2);
  13. }
  14. // Otherwise call the handler to do crash reporting.
  15. // We don't just throw because we're not the thread that
  16. // timed out; we're the thread that detected it.
  17. h.uncaughtException(Thread.currentThread(), syntheticException);
  18. }
  19. }

代码示例来源:origin: robovm/robovm

  1. private boolean loadData(String path) {
  2. try {
  3. mappedFile = MemoryMappedFile.mmapRO(path);
  4. } catch (ErrnoException errnoException) {
  5. return false;
  6. }
  7. try {
  8. readHeader();
  9. return true;
  10. } catch (Exception ex) {
  11. // Something's wrong with the file.
  12. // Log the problem and return false so we try the next choice.
  13. System.logE("tzdata file \"" + path + "\" was present but invalid!", ex);
  14. return false;
  15. }
  16. }

代码示例来源:origin: robovm/robovm

  1. defaultSocketFactory = (SocketFactory) sfc.newInstance();
  2. } catch (Exception e) {
  3. System.logE("Problem creating " + defaultName, e);

代码示例来源:origin: robovm/robovm

  1. @FindBugsSuppressWarnings("FI_EXPLICIT_INVOCATION")
  2. private void doFinalize(FinalizerReference<?> reference) {
  3. FinalizerReference.remove(reference);
  4. Object object = reference.get();
  5. reference.clear();
  6. try {
  7. finalizingStartedNanos = System.nanoTime();
  8. finalizingObject = object;
  9. synchronized (FinalizerWatchdogDaemon.INSTANCE) {
  10. FinalizerWatchdogDaemon.INSTANCE.notify();
  11. }
  12. object.finalize();
  13. } catch (Throwable ex) {
  14. // The RI silently swallows these, but Android has always logged.
  15. System.logE("Uncaught exception thrown by finalizer", ex);
  16. } finally {
  17. finalizingObject = null;
  18. }
  19. }
  20. }

代码示例来源:origin: MobiVM/robovm

  1. public TzDataAndroid(String... paths) {
  2. for (String path : paths) {
  3. if (loadData(path)) {
  4. return;
  5. }
  6. }
  7. // We didn't find any usable tzdata on disk, so let's just hard-code knowledge of "GMT".
  8. // This is actually implemented in TimeZone itself, so if this is the only time zone
  9. // we report, we won't be asked any more questions.
  10. System.logE("Couldn't find any tzdata!");
  11. version = "missing";
  12. zoneTab = "# Emergency fallback data.\n";
  13. ids = new String[] { "GMT" };
  14. byteOffsets = rawUtcOffsets = new int[1];
  15. }

代码示例来源:origin: ibinti/bugvm

  1. public TzDataAndroid(String... paths) {
  2. for (String path : paths) {
  3. if (loadData(path)) {
  4. return;
  5. }
  6. }
  7. // We didn't find any usable tzdata on disk, so let's just hard-code knowledge of "GMT".
  8. // This is actually implemented in TimeZone itself, so if this is the only time zone
  9. // we report, we won't be asked any more questions.
  10. System.logE("Couldn't find any tzdata!");
  11. version = "missing";
  12. zoneTab = "# Emergency fallback data.\n";
  13. ids = new String[] { "GMT" };
  14. byteOffsets = rawUtcOffsets = new int[1];
  15. }

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

  1. public TzDataAndroid(String... paths) {
  2. for (String path : paths) {
  3. if (loadData(path)) {
  4. return;
  5. }
  6. }
  7. // We didn't find any usable tzdata on disk, so let's just hard-code knowledge of "GMT".
  8. // This is actually implemented in TimeZone itself, so if this is the only time zone
  9. // we report, we won't be asked any more questions.
  10. System.logE("Couldn't find any tzdata!");
  11. version = "missing";
  12. zoneTab = "# Emergency fallback data.\n";
  13. ids = new String[] { "GMT" };
  14. byteOffsets = rawUtcOffsets = new int[1];
  15. }

代码示例来源:origin: com.gluonhq/robovm-rt

  1. public TzDataAndroid(String... paths) {
  2. for (String path : paths) {
  3. if (loadData(path)) {
  4. return;
  5. }
  6. }
  7. // We didn't find any usable tzdata on disk, so let's just hard-code knowledge of "GMT".
  8. // This is actually implemented in TimeZone itself, so if this is the only time zone
  9. // we report, we won't be asked any more questions.
  10. System.logE("Couldn't find any tzdata!");
  11. version = "missing";
  12. zoneTab = "# Emergency fallback data.\n";
  13. ids = new String[] { "GMT" };
  14. byteOffsets = rawUtcOffsets = new int[1];
  15. }

代码示例来源:origin: com.bugvm/bugvm-rt

  1. public TzDataAndroid(String... paths) {
  2. for (String path : paths) {
  3. if (loadData(path)) {
  4. return;
  5. }
  6. }
  7. // We didn't find any usable tzdata on disk, so let's just hard-code knowledge of "GMT".
  8. // This is actually implemented in TimeZone itself, so if this is the only time zone
  9. // we report, we won't be asked any more questions.
  10. System.logE("Couldn't find any tzdata!");
  11. version = "missing";
  12. zoneTab = "# Emergency fallback data.\n";
  13. ids = new String[] { "GMT" };
  14. byteOffsets = rawUtcOffsets = new int[1];
  15. }

代码示例来源:origin: FlexoVM/flexovm

  1. public TzDataAndroid(String... paths) {
  2. for (String path : paths) {
  3. if (loadData(path)) {
  4. return;
  5. }
  6. }
  7. // We didn't find any usable tzdata on disk, so let's just hard-code knowledge of "GMT".
  8. // This is actually implemented in TimeZone itself, so if this is the only time zone
  9. // we report, we won't be asked any more questions.
  10. System.logE("Couldn't find any tzdata!");
  11. version = "missing";
  12. zoneTab = "# Emergency fallback data.\n";
  13. ids = new String[] { "GMT" };
  14. byteOffsets = rawUtcOffsets = new int[1];
  15. }

代码示例来源:origin: MobiVM/robovm

  1. private static void finalizerTimedOut(Object object) {
  2. // The current object has exceeded the finalization deadline; abort!
  3. String message = object.getClass().getName() + ".finalize() timed out after "
  4. + (MAX_FINALIZE_NANOS / NANOS_PER_SECOND) + " seconds";
  5. Exception syntheticException = new TimeoutException(message);
  6. // We use the stack from where finalize() was running to show where it was stuck.
  7. syntheticException.setStackTrace(FinalizerDaemon.INSTANCE.getStackTrace());
  8. Thread.UncaughtExceptionHandler h = Thread.getDefaultUncaughtExceptionHandler();
  9. if (h == null) {
  10. // If we have no handler, log and exit.
  11. System.logE(message, syntheticException);
  12. System.exit(2);
  13. }
  14. // Otherwise call the handler to do crash reporting.
  15. // We don't just throw because we're not the thread that
  16. // timed out; we're the thread that detected it.
  17. h.uncaughtException(Thread.currentThread(), syntheticException);
  18. }
  19. }

代码示例来源:origin: ibinti/bugvm

  1. private boolean loadData(String path) {
  2. try {
  3. mappedFile = MemoryMappedFile.mmapRO(path);
  4. } catch (ErrnoException errnoException) {
  5. return false;
  6. }
  7. try {
  8. readHeader();
  9. return true;
  10. } catch (Exception ex) {
  11. // Something's wrong with the file.
  12. // Log the problem and return false so we try the next choice.
  13. System.logE("tzdata file \"" + path + "\" was present but invalid!", ex);
  14. return false;
  15. }
  16. }

代码示例来源:origin: com.bugvm/bugvm-rt

  1. private boolean loadData(String path) {
  2. try {
  3. mappedFile = MemoryMappedFile.mmapRO(path);
  4. } catch (ErrnoException errnoException) {
  5. return false;
  6. }
  7. try {
  8. readHeader();
  9. return true;
  10. } catch (Exception ex) {
  11. // Something's wrong with the file.
  12. // Log the problem and return false so we try the next choice.
  13. System.logE("tzdata file \"" + path + "\" was present but invalid!", ex);
  14. return false;
  15. }
  16. }

代码示例来源:origin: MobiVM/robovm

  1. private boolean loadData(String path) {
  2. try {
  3. mappedFile = MemoryMappedFile.mmapRO(path);
  4. } catch (ErrnoException errnoException) {
  5. return false;
  6. }
  7. try {
  8. readHeader();
  9. return true;
  10. } catch (Exception ex) {
  11. // Something's wrong with the file.
  12. // Log the problem and return false so we try the next choice.
  13. System.logE("tzdata file \"" + path + "\" was present but invalid!", ex);
  14. return false;
  15. }
  16. }

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

  1. private boolean loadData(String path) {
  2. try {
  3. mappedFile = MemoryMappedFile.mmapRO(path);
  4. } catch (ErrnoException errnoException) {
  5. return false;
  6. }
  7. try {
  8. readHeader();
  9. return true;
  10. } catch (Exception ex) {
  11. // Something's wrong with the file.
  12. // Log the problem and return false so we try the next choice.
  13. System.logE("tzdata file \"" + path + "\" was present but invalid!", ex);
  14. return false;
  15. }
  16. }

代码示例来源:origin: com.gluonhq/robovm-rt

  1. private boolean loadData(String path) {
  2. try {
  3. mappedFile = MemoryMappedFile.mmapRO(path);
  4. } catch (ErrnoException errnoException) {
  5. return false;
  6. }
  7. try {
  8. readHeader();
  9. return true;
  10. } catch (Exception ex) {
  11. // Something's wrong with the file.
  12. // Log the problem and return false so we try the next choice.
  13. System.logE("tzdata file \"" + path + "\" was present but invalid!", ex);
  14. return false;
  15. }
  16. }

代码示例来源:origin: FlexoVM/flexovm

  1. private boolean loadData(String path) {
  2. try {
  3. mappedFile = MemoryMappedFile.mmapRO(path);
  4. } catch (ErrnoException errnoException) {
  5. return false;
  6. }
  7. try {
  8. readHeader();
  9. return true;
  10. } catch (Exception ex) {
  11. // Something's wrong with the file.
  12. // Log the problem and return false so we try the next choice.
  13. System.logE("tzdata file \"" + path + "\" was present but invalid!", ex);
  14. return false;
  15. }
  16. }

代码示例来源:origin: FlexoVM/flexovm

  1. @FindBugsSuppressWarnings("FI_EXPLICIT_INVOCATION")
  2. private void doFinalize(FinalizerReference<?> reference) {
  3. FinalizerReference.remove(reference);
  4. Object object = reference.get();
  5. reference.clear();
  6. try {
  7. finalizingStartedNanos = System.nanoTime();
  8. finalizingObject = object;
  9. synchronized (FinalizerWatchdogDaemon.INSTANCE) {
  10. FinalizerWatchdogDaemon.INSTANCE.notify();
  11. }
  12. object.finalize();
  13. } catch (Throwable ex) {
  14. // The RI silently swallows these, but Android has always logged.
  15. System.logE("Uncaught exception thrown by finalizer", ex);
  16. } finally {
  17. finalizingObject = null;
  18. }
  19. }
  20. }

代码示例来源:origin: MobiVM/robovm

  1. @FindBugsSuppressWarnings("FI_EXPLICIT_INVOCATION")
  2. private void doFinalize(FinalizerReference<?> reference) {
  3. FinalizerReference.remove(reference);
  4. Object object = reference.get();
  5. reference.clear();
  6. try {
  7. finalizingStartedNanos = System.nanoTime();
  8. finalizingObject = object;
  9. synchronized (FinalizerWatchdogDaemon.INSTANCE) {
  10. FinalizerWatchdogDaemon.INSTANCE.notify();
  11. }
  12. object.finalize();
  13. } catch (Throwable ex) {
  14. // The RI silently swallows these, but Android has always logged.
  15. System.logE("Uncaught exception thrown by finalizer", ex);
  16. } finally {
  17. finalizingObject = null;
  18. }
  19. }
  20. }

相关文章