我是社交控,喜欢分享内容。分享到 腾讯微博时总失败,心想不能就这么算了,要看看异常的细节。
在VS 2012里,我选择 Debug > Debug Installed App Package, 搜索微博,找到腾讯微博。Start
再次共享内容到腾讯微博,随便共享点什么,bingo,ArgumentException 出来了:Value does not fall within the expected range
详细的异常信息如下,希望微博的开发早点解决这个问题:
System.ArgumentException was unhandled
HResult=-2147024809
Message=Value does not fall within the expected range.
Source=mscorlib
StackTrace:
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MBModern.Share.ShareWritePage.<PageLoaded>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__0(Object state)
at System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
InnerException:
另外 也尝试了用windbg 去调试这个问题,遗憾没有准确捕捉到 共享失败时的异常,可能windbg 异常的配置不合理吧。下边的错误消息能说明一定的问题。
Sat Jun 21 20:15:16.372 2014 (UTC + 8:00): Error: Converter failed to convert value of type 'Windows.Foundation.String' to type 'Uri'; BindingExpression: Path='DataAccount.faceurl' DataItem='MBModern.ListView.ListItemTemplate.DataModel.DataPersonalStatus, MBModern, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'; target element is 'MBModern.Components.PictureView' (Name='HeadIcon'); target property is 'PicUri' (type 'Uri').