c# - Where to define error codes in MVP design? -
i creating game in c# based of off board game , trying follow mvp design pattern. haven't started ui yet using wpf @ first thought mvp pattern fit well. write models control game have reached point want define error codes different actions. i'm running problem actions returning 1 of few different errors depending on action went wrong.
my initial thought have secondary project, ease i'll call utilities, define errors int constants. project model reference pick out error needs during actions, , presenter later use utilities have same constants error knows message show.
does make sense scheme error codes in mvp or wpf? should model returning error , its's display message @ same time or determining message job of view/presenter?
Comments
Post a Comment