Flowchart (ISO 5807)
Source code
JavaScript
function safeDiv(a, b) {
try {
if (b === 0) throw new Error("нуль");
return a / b;
} catch (e) {
return 0;
}
}The editor opens with this code — change it and the chart redraws.
- Language
- JavaScript
- Constructs
- try / catch
- Topic
- Exceptions
- Formats
- Word, Visio, draw.io, PDF, SVG