add error codes

Signed-off-by: Yuri Skripachov <y.skripachov@gmail.com>
Merge branch 'channel-mask' of sd:kbio2 into channel-mask