- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
search = 0;
try {
search = search + wdContext.currentSearchElement().getLifnr().length();
} catch (Exception ex) {
// ex.printStackTrace();
}
try {
search = search + wdContext.currentSearchElement().getBahns().length();
} catch (Exception ex) {
// ex.printStackTrace();
}
try {
search = search + wdContext.currentSearchElement().getINN().length();
} catch (Exception ex) {
// ex.printStackTrace();
}
try {
search = search + wdContext.currentSearchElement().getKPP().length();
} catch (Exception ex) {
// ex.printStackTrace();
}
try {
search = search + wdContext.currentSearchElement().getKtokk().length();
} catch (Exception ex) {
// ex.printStackTrace();
}
try {
search = search + wdContext.currentSearchElement().getLand1().length();
} catch (Exception ex) {
// ex.printStackTrace();
}
try {
search = search + wdContext.currentSearchElement().getBanks().length();
} catch (Exception e) {
// TODO: handle exception
}
try {
search = search + wdContext.currentSearchElement().getBankl().length();
} catch (Exception ex) {
// TODO: handle exception
}
try {
search = search + wdContext.currentSearchElement().getBankn().length();
} catch (Exception ex) {
// TODO: handle exception
}
try {
search = search + wdContext.currentSearchElement().getLocco().length();
} catch (Exception ex) {
// ex.printStackTrace();
}
try {
// search = search + wdContext.currentSearchElement().getLoevm().length();
search = search + wdContext.currentSearchElement().getName().length();
} catch (Exception ex) {
// ex.printStackTrace();
}
try {
search = search + wdContext.currentSearchElement().getOKPO().length();
} catch (Exception ex) {
// ex.printStackTrace();
}
try {
search = search + wdContext.currentSearchElement().getOrt01().length();
} catch (Exception ex) {
// ex.printStackTrace();
}
try {
search = search + wdContext.currentSearchElement().getSortl().length();
} catch (Exception ex) {
// ex.printStackTrace();
}
if (search == 0)
wdComponentAPI.getMessageManager().reportException("Введите критерии поиска", true);
else {
//Далее идет поиск
}
Вот такой вот была забабахана проверка входных параметров перед вызовом функции поиска (мною добавлен только последний комментарий, все остальное оригинальное)
// TODO: handle exception
а где-то
// ex.printStackTrace();
Да, так и есть, но там уже все вызовы в один try-catch блок вставлены.