You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
5.7 KiB
JavaScript
1 line
5.7 KiB
JavaScript
12 months ago
|
"use strict";(self.webpackChunkfurion=self.webpackChunkfurion||[]).push([[3043],{1437:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>a,contentTitle:()=>l,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>c});var s=o(5893),t=o(1151);const r={id:"oops",title:"4. Oops \u9759\u6001\u7c7b",sidebar_label:"4. Oops \u9759\u6001\u7c7b"},l=void 0,i={id:"global/oops",title:"4. Oops \u9759\u6001\u7c7b",description:"4.1 \u629b\u51fa\u5b57\u7b26\u4e32\u5f02\u5e38",source:"@site/docs/global/oops.mdx",sourceDirName:"global",slug:"/global/oops",permalink:"/docs/global/oops",draft:!1,unlisted:!1,editUrl:"https://gitee.com/dotnetchina/Furion/tree/v4/handbook/docs/global/oops.mdx",tags:[],version:"current",lastUpdatedBy:"MonkSoul",lastUpdatedAt:1675302258,formattedLastUpdatedAt:"Feb 2, 2023",frontMatter:{id:"oops",title:"4. Oops \u9759\u6001\u7c7b",sidebar_label:"4. Oops \u9759\u6001\u7c7b"},sidebar:"global",previous:{title:"3. DataValidator \u9759\u6001\u7c7b",permalink:"/docs/global/datavalidator"},next:{title:"5. LinqExpression \u9759\u6001\u7c7b",permalink:"/docs/global/linqexpression"}},a={},c=[{value:"4.1 \u629b\u51fa\u5b57\u7b26\u4e32\u5f02\u5e38",id:"41-\u629b\u51fa\u5b57\u7b26\u4e32\u5f02\u5e38",level:2},{value:"4.2 \u6307\u5b9a\u7c7b\u578b\u7684\u5f02\u5e38",id:"42-\u6307\u5b9a\u7c7b\u578b\u7684\u5f02\u5e38",level:2},{value:"4.3 \u72b6\u6001\u7801\u5f02\u5e38",id:"43-\u72b6\u6001\u7801\u5f02\u5e38",level:2},{value:"4.4 \u72b6\u6001\u7801\u5f02\u5e38",id:"44-\u72b6\u6001\u7801\u5f02\u5e38",level:2},{value:"4.5 \u5f02\u5e38\u65b9\u6cd5\u91cd\u8bd5",id:"45-\u5f02\u5e38\u65b9\u6cd5\u91cd\u8bd5",level:2},{value:"4.6 \u629b\u51fa\u4e1a\u52a1\u5f02\u5e38",id:"46-\u629b\u51fa\u4e1a\u52a1\u5f02\u5e38",level:2},{value:"4.7 \u8bbe\u7f6e\u54cd\u5e94\u72b6\u6001\u7801",id:"47-\u8bbe\u7f6e\u54cd\u5e94\u72b6\u6001\u7801",level:2},{value:"4.8 \u643a\u5e26\u989d\u5916\u6570\u636e",id:"48-\u643a\u5e26\u989d\u5916\u6570\u636e",level:2}];function d(e){const n={admonition:"admonition",code:"code",h2:"h2",p:"p",pre:"pre",...(0,t.a)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"41-\u629b\u51fa\u5b57\u7b26\u4e32\u5f02\u5e38",children:"4.1 \u629b\u51fa\u5b57\u7b26\u4e32\u5f02\u5e38"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'throw Oops.Oh("\u5f02\u5e38\u6d88\u606f");\r\nthrow Oops.Oh("\u5f02\u5e38\u6d88\u606f\uff1a{0}", "\u51fa\u9519\u4e86");\n'})}),"\n",(0,s.jsx)(n.h2,{id:"42-\u6307\u5b9a\u7c7b\u578b\u7684\u5f02\u5e38",children:"4.2 \u6307\u5b9a\u7c7b\u578b\u7684\u5f02\u5e38"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'throw Oops.Oh("\u5f02\u5e38\u6d88\u606f", typeof(ArgumentNullException));\r\nthrow Oops.Oh("\u5f02\u5e38\u6d88\u606f\uff1a{0}", typeof(ArgumentNullException), "\u51fa\u9519\u4e86");\n'})}),"\n",(0,s.jsx)(n.h2,{id:"43-\u72b6\u6001\u7801\u5f02\u5e38",children:"4.3 \u72b6\u6001\u7801\u5f02\u5e38"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'throw Oops.Oh(1000);\r\nthrow Oops.Oh(1000, "\u51fa\u9519\u4e86");\n'})}),"\n",(0,s.jsx)(n.h2,{id:"44-\u72b6\u6001\u7801\u5f02\u5e38",children:"4.4 \u72b6\u6001\u7801\u5f02\u5e38"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:'throw Oops.Oh(1000, typeof(ArgumentNullException));\r\nthrow Oops.Oh(1000, typeof(ArgumentNullException), "\u51fa\u9519\u4e86");\n'})}),"\n",(0,s.jsx)(n.h2,{id:"45-\u5f02\u5e38\u65b9\u6cd5\u91cd\u8bd5",children:"4.5 \u5f02\u5e38\u65b9\u6cd5\u91cd\u8bd5"}),"\n",(0,s.jsx)(n.admonition,{title:"\u8c03\u6574\u8bf4\u660e",type:"important",children:(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"v2.17.0+"})," \u7248\u672c\u4e0b\u9762\u65b9\u6cd5\u8bf7\u4f7f\u7528 ",(0,s.jsx)(n.code,{children:"Retry.Invoke()/Retry.InvokeAsync()"})," \u66ff\u4ee3\u3002"]})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-cs",metastring:"showLineNumbers",children:"Oops.Retry(() => {\r\
|