on master help sign in
replace "error" crasher with actual error report
commitf9dfde9c8fca50c6a8e28a1f715a406cf35da5fd authorAgentM <agentm@themactionfaction.com> dateMon 28 Nov 2016, 09:32 (10 years ago) parent2c079c0
1 file changed+3−3
src/lib/ProjectM36/RelationalExpression.hs+3−3
src/lib/ProjectM36/RelationalExpression.hs+3−3
@@ -645,9 +645,9 @@ verifyAtomExprTypes relIn (AttributeAtomExpr attrName) expectedType = runExceptT
645645 rstate <- get
646646 case A.atomTypeForAttributeName attrName (attributes relIn) of
647647 Right aType -> pure aType
648− Left (NoSuchAttributeNamesError _) -> case rstate of
649− RelationalExprStateTupleElems _ _ -> error "impossible"
650− RelationalExprStateElems _ -> error "poop"
648+ (Left err@(NoSuchAttributeNamesError _)) -> case rstate of
649+ RelationalExprStateTupleElems _ _ -> throwE err
650+ RelationalExprStateElems _ -> throwE err
651651 RelationalExprStateAttrsElems _ attrs -> case A.attributeForName attrName attrs of
652652 Left err' -> throwE err'
653653 Right attrType -> either throwE pure (atomTypeVerify expectedType (A.atomType attrType))