1
A
回答
7
你可以找到MSDN文档here。
failwithf : StringFormat<'T,'Result> -> 'T
它接受一个StringFormat
很像printf
或sprintf
,让你包含类型安全的字符串格式化,例如:
failwithf "Error Code %i" 55
+0
Tomas敦促不要使用这个:https://github.com/tpetricek/FSharp.Formatting/pull/225 –
+1
@ScottNimrod现在有一个编译器警告:https://github.com/Microsoft/visualfsharp /问题/ 46 – TheInnerLight
相关问题
- 1. WPF能做什么和不做什么?
- 2. 在Perl中做什么=〜做什么?
- 3. 什么“?”做?什么是__FILE__?
- 4. 什么是setDetailItem:做什么?
- 5. socket.IPPROTO_TCP做什么?
- 6. assert_ok做什么?
- 7. .call做什么?
- 8. || =做什么?
- 9. for_write_seq_lis做什么?
- 10. addScalar做什么?
- 11. BOOST_PP_AUTO_REC做什么?
- 12. !! some_object做什么?
- 13. MailMessage.IsBodyHtml做什么?
- 14. Q_REQUIRED_RESULT做什么?
- 15. scroll.scrolldisabler做什么?
- 16. initializer_list做什么?
- 17. mod_pagespeed做什么?
- 18. FormsAuthentication.SetAuthCookie做什么
- 19. `!: - `做什么?
- 20. TabPage.Hide()做什么?
- 21. CCriticalSection做什么?
- 22. FILE_FLAG_POSIX_SEMANTICS做什么?
- 23. waitpid()做什么?
- 24. “:=”做什么?
- 25. testAndroidTestCaseSetUpProperly做什么
- 26. “as_text_trimmed”做什么?
- 27. requirejs.config()做什么?
- 28. Html.HiddenFor做什么?
- 29. SIFT做什么?
- 30. auto &&做什么?
'failwith “你好”'生成包含'Hello'异常。 'failwithf“Hello%s”“There”会生成一个包含'Hello There'的异常。这就像'printf' – FuleSnabel