MLBEDSW-2066 Improve Exception messages

Minor refactoring to use fstrings.
Improve Error classes to correctly inherit the base class.
Use existing exception classes instead of plain exceptions where it
makes sense.

Signed-off-by: Michael McGeagh <michael.mcgeagh@arm.com>
Change-Id: I0941c04e91010da1db77299517a8e2d896371e77
diff --git a/ethosu/vela/tensor_allocation.py b/ethosu/vela/tensor_allocation.py
index 9736ca2..7f66579 100644
--- a/ethosu/vela/tensor_allocation.py
+++ b/ethosu/vela/tensor_allocation.py
@@ -91,7 +91,7 @@
             if not all(op and op.run_on_npu for op in tens.ops + tens.consumer_list):
                 # This is a CPU tensor, verify alignment
                 if tens.address % alignment != 0:
-                    raise AllocationError("Tensor {} not aligned to {} bytes".format(tens.name, alignment))
+                    raise AllocationError(f"Tensor '{tens.name}' not aligned to {alignment} bytes")
 
 
 def verify_allocation(live_ranges: LiveRangeGraph, alignment: int):
@@ -104,14 +104,8 @@
                 overlap, tens_n, tens_m = n.overlaps_address(m)
                 if overlap and not (tens_n.equivalent(tens_m) and tens_n.address == tens_m.address):
                     raise AllocationError(
-                        "Overlapping buffers: {}: {} -> {} and {}: {} -> {}".format(
-                            n.name,
-                            tens_n.address,
-                            tens_n.address + n.size,
-                            m.name,
-                            tens_m.address,
-                            tens_m.address + m.size,
-                        )
+                        f"Overlapping buffers: {n.name}: {tens_n.address} -> {tens_n.address + n.size}"
+                        f" and {m.name}: {tens_m.address} -> {tens_m.address + m.size}"
                     )