meson: Use a better error message in an impossible case
authorPeter Eisentraut <peter@eisentraut.org>
Thu, 29 Jun 2023 11:06:41 +0000 (13:06 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Thu, 29 Jun 2023 11:06:41 +0000 (13:06 +0200)
Meson validates 'choice' options for us, so technically this case is
impossible. A better error message helps people reading the code
understand what is going on in that branch.

Author: Tristan Partin <tristan@neon.tech>
Discussion: https://www.postgresql.org/message-id/flat/CSPIJVUDZFKX.3KHMOAVGF94RV%40c3po

meson.build

index c0c00d22351c38c1e16142c6f189b2b6c596ea13..77e975051dd5b34051e33c7601ecac8722d4cdd7 100644 (file)
@@ -1346,7 +1346,7 @@ if uuidopt != 'none'
     uuidfunc = 'uuid_export'
     uuidheader = 'uuid.h'
   else
-    error('huh')
+    error('unknown uuid build option value: @0@'.format(uuidopt))
   endif
 
   if not cc.has_header_symbol(uuidheader, uuidfunc, args: test_c_args, dependencies: uuid)