下面的代码可以给出NullPointerException或IllegalArgumentException,因此我可以同时捕获两者,但是无论哪一个,我都想抛出ExceptionWrapper。
2020-10-25 02:01
在我的JUnit 5测试中,如果我喂该方法,我希望抛出“ ExceptionWrapper.class”。具有空对象的postCourse()。但是,它抛出了NullPointerException。
<body> <a href="#" id="button", class="btn btn-primary">Add Icon</a> </body>
$("#button").popover({
html: true,
title: popoverTitle,
content: "Popover content",
});
function popoverTitle() {
console.log("Loading title"); // outputs twice every time
return "Popover Title";
};
请告知,谢谢。
答案 0 :(得分:0)
看起来您的对象def load_mask(self, image_id, xml=False):
# get details of image
info = self.image_info[image_id]
boxes = []
为空,您必须像这样初始化该对象:
courseService