mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Add RecursionError
This commit is contained in:
@@ -851,6 +851,7 @@ pub fn make_module(vm: &VirtualMachine, module: PyObjectRef) {
|
||||
"ReferenceError" => ctx.exceptions.reference_error.clone(),
|
||||
"SyntaxError" => ctx.exceptions.syntax_error.clone(),
|
||||
"NotImplementedError" => ctx.exceptions.not_implemented_error.clone(),
|
||||
"RecursionError" => ctx.exceptions.recursion_error.clone(),
|
||||
"TypeError" => ctx.exceptions.type_error.clone(),
|
||||
"ValueError" => ctx.exceptions.value_error.clone(),
|
||||
"IndexError" => ctx.exceptions.index_error.clone(),
|
||||
|
||||
@@ -222,6 +222,7 @@ pub struct ExceptionZoo {
|
||||
pub module_not_found_error: PyClassRef,
|
||||
pub name_error: PyClassRef,
|
||||
pub not_implemented_error: PyClassRef,
|
||||
pub recursion_error: PyClassRef,
|
||||
pub os_error: PyClassRef,
|
||||
pub overflow_error: PyClassRef,
|
||||
pub permission_error: PyClassRef,
|
||||
@@ -280,6 +281,7 @@ impl ExceptionZoo {
|
||||
let zero_division_error = create_type("ZeroDivisionError", &type_type, &arithmetic_error);
|
||||
let module_not_found_error = create_type("ModuleNotFoundError", &type_type, &import_error);
|
||||
let not_implemented_error = create_type("NotImplementedError", &type_type, &runtime_error);
|
||||
let recursion_error = create_type("RecursionError", &type_type, &runtime_error);
|
||||
let file_not_found_error = create_type("FileNotFoundError", &type_type, &os_error);
|
||||
let permission_error = create_type("PermissionError", &type_type, &os_error);
|
||||
let file_exists_error = create_type("FileExistsError", &type_type, &os_error);
|
||||
@@ -321,6 +323,7 @@ impl ExceptionZoo {
|
||||
module_not_found_error,
|
||||
name_error,
|
||||
not_implemented_error,
|
||||
recursion_error,
|
||||
os_error,
|
||||
overflow_error,
|
||||
permission_error,
|
||||
|
||||
Reference in New Issue
Block a user