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