@sat0sh1c — I started my comment with the note that this design can be considered ugly. This is not my idea, and I cannot say I like it much. This is just what it is.
But I don't think the valid values start with -1. Different negative values can be used to conduct different error conditions.