我一直在为此苦苦挣扎很久-
def aws_file_exists? filename
begin
@s3_interface.get('bucket', filename)
return true
catch Aws::AwsError, Aws::AwsError2, NoSuchKey, RuntimeError, AmazonError, AWSError
return false
end
end
只是,它没有捕获 !( @^%@&$*%#错误,报告为:
Aws::AwsError: NoSuchKey: The specified key does not exist.
我做错了什么/我需要捕捉的错误类型是什么?