function nagctlr(type, err, mdlName) %#ok<INUSD>
%NAGCTLR replace with message viewer

% Copyright 2006-2013 The MathWorks, Inc.

%update code to use new message viewer instead of the simulink viewer.
hdl_coder_auto_build_stage = Simulink.output.Stage('HDLCoder', 'ModelName', gcs(), 'UIMode', true);
switch( lower(type) )
case 'error'
Simulink.output.error(err,'Component','HDLCoder','Category','HDL');
case 'message'
Simulink.output.info(err,'Component','HDLCoder','Category','HDL');
case 'warning'
Simulink.output.warning(err,'Component','HDLCoder','Category','HDL');
otherwise
assert(false,['Unknown use of hdlcoderui.nagctlr with type, ',type])
end