In Apex, an exception that is not caught bubbles up the stack. For database work, DmlException is common — catch the specific type when you can, keep finally for cleanup that must run either way.
Pick what happens after this update:
try {
update accounts;
} catch (DmlException e) {
// not taken in this scenario
System.debug(LoggingLevel.ERROR, e.getMessage());
} catch (Exception e) {
// …
} finally {
// always runs: good place for limits-neutral cleanup notes
}Reading the path: try completes → finally runs → code after the block runs.
Strings from the database or UI are often null, empty, or only spaces. In Apex, == null checks only null; String.isBlank covers null, empty, and whitespace — pick the guard that matches your business rule.
Pretend this field came from a record:
String name = null;
String name = record.Name; // might be null
if (String.isBlank(name)) {
name = 'Unnamed'; // safe default before DML or SOQL
}