浏览代码

minor fixes

/fix_shortcuts
Xingwei Zhu 3 年前
当前提交
5d9abebb
共有 3 个文件被更改,包括 4 次插入4 次删除
  1. 4
      com.unity.uiwidgets/Runtime/async/future.cs
  2. 2
      com.unity.uiwidgets/Runtime/foundation/assertions.cs
  3. 2
      com.unity.uiwidgets/Runtime/foundation/debug.cs

4
com.unity.uiwidgets/Runtime/async/future.cs


future.then((object value) => {
remaining--;
if (values != null) {
values.Insert(pos, (T)value);
values[pos] = (T)value;
if (remaining == 0) {
result._completeWithValue(values);
}

return value(FutureOr.value(new List<T>()));
}
values = new List<T>(remaining);
values = new List<T>(new T[remaining]);
}
catch (Exception e) {
// The error must have been thrown while iterating over the futures

2
com.unity.uiwidgets/Runtime/foundation/assertions.cs


details.toDiagnosticsNode(style: DiagnosticsTreeStyle.error)).TrimEnd(), details.exception);
}
D.logError($"Another exception was thrown: ${details.summary}");
D.logError($"Another exception was thrown: ${details.summary}", details.exception);
_errorCount += 1;
}

2
com.unity.uiwidgets/Runtime/foundation/debug.cs


public AssertionError(string message) : base(message: message) {
}
public AssertionError(string message, Exception innerException = null) : base(message: message) {
public AssertionError(string message, Exception innerException) : base(message: message) {
this.innerException = innerException;
}

正在加载...
取消
保存