本文整理了Java中java.lang.System.logE()
方法的一些代码示例,展示了System.logE()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。System.logE()
方法的具体详情如下:
包路径:java.lang.System
类名称:System
方法名:logE
暂无
代码示例来源:origin: robovm/robovm
public TzDataAndroid(String... paths) {
for (String path : paths) {
if (loadData(path)) {
return;
}
}
// We didn't find any usable tzdata on disk, so let's just hard-code knowledge of "GMT".
// This is actually implemented in TimeZone itself, so if this is the only time zone
// we report, we won't be asked any more questions.
System.logE("Couldn't find any tzdata!");
version = "missing";
zoneTab = "# Emergency fallback data.\n";
ids = new String[] { "GMT" };
byteOffsets = rawUtcOffsets = new int[1];
}
代码示例来源:origin: robovm/robovm
private static void finalizerTimedOut(Object object) {
// The current object has exceeded the finalization deadline; abort!
String message = object.getClass().getName() + ".finalize() timed out after "
+ (MAX_FINALIZE_NANOS / NANOS_PER_SECOND) + " seconds";
Exception syntheticException = new TimeoutException(message);
// We use the stack from where finalize() was running to show where it was stuck.
syntheticException.setStackTrace(FinalizerDaemon.INSTANCE.getStackTrace());
Thread.UncaughtExceptionHandler h = Thread.getDefaultUncaughtExceptionHandler();
if (h == null) {
// If we have no handler, log and exit.
System.logE(message, syntheticException);
System.exit(2);
}
// Otherwise call the handler to do crash reporting.
// We don't just throw because we're not the thread that
// timed out; we're the thread that detected it.
h.uncaughtException(Thread.currentThread(), syntheticException);
}
}
代码示例来源:origin: robovm/robovm
private boolean loadData(String path) {
try {
mappedFile = MemoryMappedFile.mmapRO(path);
} catch (ErrnoException errnoException) {
return false;
}
try {
readHeader();
return true;
} catch (Exception ex) {
// Something's wrong with the file.
// Log the problem and return false so we try the next choice.
System.logE("tzdata file \"" + path + "\" was present but invalid!", ex);
return false;
}
}
代码示例来源:origin: robovm/robovm
defaultSocketFactory = (SocketFactory) sfc.newInstance();
} catch (Exception e) {
System.logE("Problem creating " + defaultName, e);
代码示例来源:origin: robovm/robovm
@FindBugsSuppressWarnings("FI_EXPLICIT_INVOCATION")
private void doFinalize(FinalizerReference<?> reference) {
FinalizerReference.remove(reference);
Object object = reference.get();
reference.clear();
try {
finalizingStartedNanos = System.nanoTime();
finalizingObject = object;
synchronized (FinalizerWatchdogDaemon.INSTANCE) {
FinalizerWatchdogDaemon.INSTANCE.notify();
}
object.finalize();
} catch (Throwable ex) {
// The RI silently swallows these, but Android has always logged.
System.logE("Uncaught exception thrown by finalizer", ex);
} finally {
finalizingObject = null;
}
}
}
代码示例来源:origin: MobiVM/robovm
public TzDataAndroid(String... paths) {
for (String path : paths) {
if (loadData(path)) {
return;
}
}
// We didn't find any usable tzdata on disk, so let's just hard-code knowledge of "GMT".
// This is actually implemented in TimeZone itself, so if this is the only time zone
// we report, we won't be asked any more questions.
System.logE("Couldn't find any tzdata!");
version = "missing";
zoneTab = "# Emergency fallback data.\n";
ids = new String[] { "GMT" };
byteOffsets = rawUtcOffsets = new int[1];
}
代码示例来源:origin: ibinti/bugvm
public TzDataAndroid(String... paths) {
for (String path : paths) {
if (loadData(path)) {
return;
}
}
// We didn't find any usable tzdata on disk, so let's just hard-code knowledge of "GMT".
// This is actually implemented in TimeZone itself, so if this is the only time zone
// we report, we won't be asked any more questions.
System.logE("Couldn't find any tzdata!");
version = "missing";
zoneTab = "# Emergency fallback data.\n";
ids = new String[] { "GMT" };
byteOffsets = rawUtcOffsets = new int[1];
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
public TzDataAndroid(String... paths) {
for (String path : paths) {
if (loadData(path)) {
return;
}
}
// We didn't find any usable tzdata on disk, so let's just hard-code knowledge of "GMT".
// This is actually implemented in TimeZone itself, so if this is the only time zone
// we report, we won't be asked any more questions.
System.logE("Couldn't find any tzdata!");
version = "missing";
zoneTab = "# Emergency fallback data.\n";
ids = new String[] { "GMT" };
byteOffsets = rawUtcOffsets = new int[1];
}
代码示例来源:origin: com.gluonhq/robovm-rt
public TzDataAndroid(String... paths) {
for (String path : paths) {
if (loadData(path)) {
return;
}
}
// We didn't find any usable tzdata on disk, so let's just hard-code knowledge of "GMT".
// This is actually implemented in TimeZone itself, so if this is the only time zone
// we report, we won't be asked any more questions.
System.logE("Couldn't find any tzdata!");
version = "missing";
zoneTab = "# Emergency fallback data.\n";
ids = new String[] { "GMT" };
byteOffsets = rawUtcOffsets = new int[1];
}
代码示例来源:origin: com.bugvm/bugvm-rt
public TzDataAndroid(String... paths) {
for (String path : paths) {
if (loadData(path)) {
return;
}
}
// We didn't find any usable tzdata on disk, so let's just hard-code knowledge of "GMT".
// This is actually implemented in TimeZone itself, so if this is the only time zone
// we report, we won't be asked any more questions.
System.logE("Couldn't find any tzdata!");
version = "missing";
zoneTab = "# Emergency fallback data.\n";
ids = new String[] { "GMT" };
byteOffsets = rawUtcOffsets = new int[1];
}
代码示例来源:origin: FlexoVM/flexovm
public TzDataAndroid(String... paths) {
for (String path : paths) {
if (loadData(path)) {
return;
}
}
// We didn't find any usable tzdata on disk, so let's just hard-code knowledge of "GMT".
// This is actually implemented in TimeZone itself, so if this is the only time zone
// we report, we won't be asked any more questions.
System.logE("Couldn't find any tzdata!");
version = "missing";
zoneTab = "# Emergency fallback data.\n";
ids = new String[] { "GMT" };
byteOffsets = rawUtcOffsets = new int[1];
}
代码示例来源:origin: MobiVM/robovm
private static void finalizerTimedOut(Object object) {
// The current object has exceeded the finalization deadline; abort!
String message = object.getClass().getName() + ".finalize() timed out after "
+ (MAX_FINALIZE_NANOS / NANOS_PER_SECOND) + " seconds";
Exception syntheticException = new TimeoutException(message);
// We use the stack from where finalize() was running to show where it was stuck.
syntheticException.setStackTrace(FinalizerDaemon.INSTANCE.getStackTrace());
Thread.UncaughtExceptionHandler h = Thread.getDefaultUncaughtExceptionHandler();
if (h == null) {
// If we have no handler, log and exit.
System.logE(message, syntheticException);
System.exit(2);
}
// Otherwise call the handler to do crash reporting.
// We don't just throw because we're not the thread that
// timed out; we're the thread that detected it.
h.uncaughtException(Thread.currentThread(), syntheticException);
}
}
代码示例来源:origin: ibinti/bugvm
private boolean loadData(String path) {
try {
mappedFile = MemoryMappedFile.mmapRO(path);
} catch (ErrnoException errnoException) {
return false;
}
try {
readHeader();
return true;
} catch (Exception ex) {
// Something's wrong with the file.
// Log the problem and return false so we try the next choice.
System.logE("tzdata file \"" + path + "\" was present but invalid!", ex);
return false;
}
}
代码示例来源:origin: com.bugvm/bugvm-rt
private boolean loadData(String path) {
try {
mappedFile = MemoryMappedFile.mmapRO(path);
} catch (ErrnoException errnoException) {
return false;
}
try {
readHeader();
return true;
} catch (Exception ex) {
// Something's wrong with the file.
// Log the problem and return false so we try the next choice.
System.logE("tzdata file \"" + path + "\" was present but invalid!", ex);
return false;
}
}
代码示例来源:origin: MobiVM/robovm
private boolean loadData(String path) {
try {
mappedFile = MemoryMappedFile.mmapRO(path);
} catch (ErrnoException errnoException) {
return false;
}
try {
readHeader();
return true;
} catch (Exception ex) {
// Something's wrong with the file.
// Log the problem and return false so we try the next choice.
System.logE("tzdata file \"" + path + "\" was present but invalid!", ex);
return false;
}
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
private boolean loadData(String path) {
try {
mappedFile = MemoryMappedFile.mmapRO(path);
} catch (ErrnoException errnoException) {
return false;
}
try {
readHeader();
return true;
} catch (Exception ex) {
// Something's wrong with the file.
// Log the problem and return false so we try the next choice.
System.logE("tzdata file \"" + path + "\" was present but invalid!", ex);
return false;
}
}
代码示例来源:origin: com.gluonhq/robovm-rt
private boolean loadData(String path) {
try {
mappedFile = MemoryMappedFile.mmapRO(path);
} catch (ErrnoException errnoException) {
return false;
}
try {
readHeader();
return true;
} catch (Exception ex) {
// Something's wrong with the file.
// Log the problem and return false so we try the next choice.
System.logE("tzdata file \"" + path + "\" was present but invalid!", ex);
return false;
}
}
代码示例来源:origin: FlexoVM/flexovm
private boolean loadData(String path) {
try {
mappedFile = MemoryMappedFile.mmapRO(path);
} catch (ErrnoException errnoException) {
return false;
}
try {
readHeader();
return true;
} catch (Exception ex) {
// Something's wrong with the file.
// Log the problem and return false so we try the next choice.
System.logE("tzdata file \"" + path + "\" was present but invalid!", ex);
return false;
}
}
代码示例来源:origin: FlexoVM/flexovm
@FindBugsSuppressWarnings("FI_EXPLICIT_INVOCATION")
private void doFinalize(FinalizerReference<?> reference) {
FinalizerReference.remove(reference);
Object object = reference.get();
reference.clear();
try {
finalizingStartedNanos = System.nanoTime();
finalizingObject = object;
synchronized (FinalizerWatchdogDaemon.INSTANCE) {
FinalizerWatchdogDaemon.INSTANCE.notify();
}
object.finalize();
} catch (Throwable ex) {
// The RI silently swallows these, but Android has always logged.
System.logE("Uncaught exception thrown by finalizer", ex);
} finally {
finalizingObject = null;
}
}
}
代码示例来源:origin: MobiVM/robovm
@FindBugsSuppressWarnings("FI_EXPLICIT_INVOCATION")
private void doFinalize(FinalizerReference<?> reference) {
FinalizerReference.remove(reference);
Object object = reference.get();
reference.clear();
try {
finalizingStartedNanos = System.nanoTime();
finalizingObject = object;
synchronized (FinalizerWatchdogDaemon.INSTANCE) {
FinalizerWatchdogDaemon.INSTANCE.notify();
}
object.finalize();
} catch (Throwable ex) {
// The RI silently swallows these, but Android has always logged.
System.logE("Uncaught exception thrown by finalizer", ex);
} finally {
finalizingObject = null;
}
}
}
内容来源于网络,如有侵权,请联系作者删除!