<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="error" module="max" category="System">
	<digest>
		Report Max errors
	</digest>
	<description>
		Listens for and reports Max errors as message output. This will allow for error management in cases where it is not appropriate to display the Max window.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			System
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				1 Turns Error Listening On, 0 Turns It Off
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				1 Turns Error Listening On, 0 Turns It Off
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				Error Message Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="on" optional="1" type="int">
			<digest>
				Turn on error reporting
			</digest>
			<description>
				Turn on error reporting. If no argument is given, then error reporting will be off until an <m>int</m> message is received.
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist>
				<arg name="enable" optional="0" type="int" />
			</arglist>
			<digest>
				Set error management flag
			</digest>
			<description>
				The <o>error</o> object allows you to catch errors and output them as Max messages. A non-zero number starts the error object &quot;listening&quot; for Max errors. The <o>error</o> object must be listening to produce any output. A <m>0</m> turns off listening.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="enable" optional="0" type="float" />
			</arglist>
			<digest>
				Set error management flag
			</digest>
			<description>
				Converted to <m>int</m>.
			</description>
		</method>
		<method name="error">
			<arglist>
				<arg name="message" optional="0" type="list" />
			</arglist>
			<digest>
				Output an error message
			</digest>
			<description>
				The word <m>error</m> followed by any message will send that message out the outlet.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="error.png" caption="Intercept error messages" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="print" />
	</seealsolist>
	<misc name="Output">
		<entry name="symbol">
			<description>
				Any Max error generated by any object in any patch while the <o>error</o> object is listening is sent out the outlet preceded by the symbol <m>error</m>. The messages are output as individual words so you can check for specific failures.
				<br />
				<br />
				If you want to strip off the initial <m>error</m> message from the object's output, use a <o>route</o>  <o>error</o> object. If you want to use the <o>error</o> object's output as a message, put a <o>prepend</o>  <m>read</m> object between <o>route</o>  <o>error</o> and the object that will process the error message.
			</description>
		</entry>
	</misc>
</c74object>
