Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf8d5620 authored by Behdad Esfahbod's avatar Behdad Esfahbod
Browse files

Throw exception on nonexistent font

In K, this used to throw RuntimeException.  Before this patch, NULL
was returned and no exceptions thrown.  With this patch,
FileNotFoundException is thrown.  This might be considered API
change and be undesirable as callers need to either catch it or
declare it to be thrown.

Bug: 16180181
Change-Id: If83d76857f640c6293a3d5d08fb89ceddbaf41bc
parent 80030f90
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -188,7 +188,7 @@ public class Typeface {
                return createFromFamiliesWithDefault(families);
            }
        }
        return null;
        throw new RuntimeException("Font asset not found " + path);
    }

    /**
@@ -215,7 +215,7 @@ public class Typeface {
                return createFromFamiliesWithDefault(families);
            }
        }
        return null;
        throw new RuntimeException("Font not found " + path);
    }

    /**