Exception Handling
- Last UpdatedJun 02, 2022
- 1 minute read
Arithmetic errors or errors constructing DbDouble's will throw a PdmsException containing the error message. For example, adding 2 quantities of different dimensions together will throw a PdmsException which can be caught
d1 = DbDouble.Create("1 kg");
d2 = DbDouble.Create("2 mm");
try
{
d3 = d1 + d2;
}
catch (PdmsException ex)
{
}