我编写了这段代码来测试自定义异常如何在dart中工作.
我没有得到所需的输出有人可以解释我如何处理它?
void main()
{
try
{
throwException();
}
on customException
{
print("custom exception is been obtained");
}
}
throwException()
{
throw new customException('This is my first custom exception');
}
Run Code Online (Sandbox Code Playgroud) 我在这段代码中得到了一个语法异常**+ b**== c**:我不知道问题是什么帮助我...
def getValue():
a, b,c =1,2,3;
while a:
while b:
while c:
if a + b + c == 1000 and a** + b** == c**:
print("A : {} B : {} C:{}".format( a, b, c))
return a*b*c;
else:
c += 1;
b += 1;
a+=1;
print("Answer : {}".format(getValue()))
Run Code Online (Sandbox Code Playgroud)
对于那些对我的问题不屑一顾的人我接受了我的错误,但是对我的帖子给出了否定信息让我觉得不要问这个问题.如果它与本网站上的任何主题无关,则可以提供否定.但是对于我所犯的错误,并要求帮助进行审查,即使你发现它很愚蠢,就像我在弄清楚错误之后你做的那样,你不应该给予否定,这会让人失去理智.