Skip to content

Commit 40f3bbe

Browse files
committed
update err msg
1 parent dca43bf commit 40f3bbe

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/build_tools.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,12 @@ impl FromPyObject<'_> for ExtraBehavior {
214214
"allow" => ExtraBehavior::Allow,
215215
"ignore" => ExtraBehavior::Ignore,
216216
"forbid" => ExtraBehavior::Forbid,
217-
_ => return py_err!(PyTypeError; "Invalid string for ExtraBehavior"),
217+
_ => {
218+
return py_err!(PyTypeError; "Invalid string for ExtraBehavior. Possible values are allow, ignore and forbid")
219+
}
218220
})
219221
} else {
220-
py_err!(PyTypeError; "Expected string value allow, ignore or forbid, got {}", obj.get_type())
222+
py_err!(PyTypeError; "Expected string value, got {}", obj.get_type())
221223
}
222224
}
223225
}

0 commit comments

Comments
 (0)