From 1fb616dac50969cef3f260ec9d899f2f980fca1d Mon Sep 17 00:00:00 2001 From: Gabor Liptak Date: Sat, 29 Jan 2011 15:52:39 -0500 Subject: Update Handling Other Messages section in gen_server, gen_fsm, gen_events overviews --- system/doc/design_principles/events.xml | 17 +++++++++++++++++ system/doc/design_principles/fsm.xml | 5 +++++ system/doc/design_principles/gen_server_concepts.xml | 5 +++++ 3 files changed, 27 insertions(+) (limited to 'system') diff --git a/system/doc/design_principles/events.xml b/system/doc/design_principles/events.xml index 5579f1e459..fab9e8305e 100644 --- a/system/doc/design_principles/events.xml +++ b/system/doc/design_principles/events.xml @@ -217,5 +217,22 @@ terminate(_Args, Fd) -> ok +
+ Handling Other Messages +

If the gen_event should be able to receive other messages than + events, the callback function handle_info(Info, StateName, StateData) + must be implemented to handle them. Examples of + other messages are exit messages, if the gen_event is linked to + other processes (than the supervisor) and trapping exit signals.

+ +handle_info({'EXIT', Pid, Reason}, State) -> + ..code to handle exits here.. + {ok, NewState}. +

The code_change method also has to be implemented.

+ +code_change(OldVsn, State, Extra) -> + ..code to convert state (and more) during code change + {ok, NewState} +
diff --git a/system/doc/design_principles/fsm.xml b/system/doc/design_principles/fsm.xml index 7cdd62057b..c3e9027274 100644 --- a/system/doc/design_principles/fsm.xml +++ b/system/doc/design_principles/fsm.xml @@ -308,6 +308,11 @@ terminate(normal, _StateName, _StateData) -> handle_info({'EXIT', Pid, Reason}, StateName, StateData) -> ..code to handle exits here.. {next_state, StateName1, StateData1}. +

The code_change method also has to be implemented.

+ +code_change(OldVsn, StateName, StateData, Extra) -> + ..code to convert state (and more) during code change + {ok, NextStateName, NewStateData} diff --git a/system/doc/design_principles/gen_server_concepts.xml b/system/doc/design_principles/gen_server_concepts.xml index 8131c47a69..231333da0e 100644 --- a/system/doc/design_principles/gen_server_concepts.xml +++ b/system/doc/design_principles/gen_server_concepts.xml @@ -264,6 +264,11 @@ terminate(normal, State) -> handle_info({'EXIT', Pid, Reason}, State) -> ..code to handle exits here.. {noreply, State1}. +

The code_change method also has to be implemented.

+ +code_change(OldVsn, State, Extra) -> + ..code to convert state (and more) during code change + {ok, NewState}. -- cgit v1.2.3 From 23b4cde859059c350bdd95ddfac317be62705561 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 8 Mar 2011 11:23:24 +0100 Subject: Reference manual: Don't mention fault/{1,2} --- system/doc/reference_manual/errors.xml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'system') diff --git a/system/doc/reference_manual/errors.xml b/system/doc/reference_manual/errors.xml index 02885a3813..99e48544d6 100644 --- a/system/doc/reference_manual/errors.xml +++ b/system/doc/reference_manual/errors.xml @@ -48,10 +48,8 @@ The Erlang programming language has built-in features for handling of run-time errors.

A run-time error can also be emulated by calling - erlang:error(Reason), erlang:error(Reason, Args) - (those appeared in Erlang 5.4/OTP-R10), - erlang:fault(Reason) or erlang:fault(Reason, Args) - (old equivalents).

+ erlang:error(Reason) or erlang:error(Reason, Args) + (those appeared in Erlang 5.4/OTP-R10).

A run-time error is another name for an exception of class error.

@@ -91,7 +89,7 @@ error - Run-time error for example 1+a, or the process called erlang:error/1,2 (appeared in Erlang 5.4/OTP-R10B) or erlang:fault/1,2 (old equivalent) + Run-time error for example 1+a, or the process called erlang:error/1,2 (appeared in Erlang 5.4/OTP-R10B) exit -- cgit v1.2.3 From 18cb45518979a0825f92ffaa11e0c14721f460bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 8 Mar 2011 11:23:58 +0100 Subject: Reference manual: Add missing right parenthesis --- system/doc/reference_manual/errors.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') diff --git a/system/doc/reference_manual/errors.xml b/system/doc/reference_manual/errors.xml index 99e48544d6..2160398700 100644 --- a/system/doc/reference_manual/errors.xml +++ b/system/doc/reference_manual/errors.xml @@ -106,7 +106,7 @@ and a stack trace (that aids in finding the code location of the exception).

The stack trace can be retrieved using - erlang:get_stacktrace/0 (new in Erlang 5.4/OTP-R10B + erlang:get_stacktrace/0 (new in Erlang 5.4/OTP-R10B) from within a try expression, and is returned for exceptions of class error from a catch expression.

An exception of class error is also known as a run-time -- cgit v1.2.3 From 252eb8d4aa133826ae05043dbdddf9389e416fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Tue, 8 Mar 2011 11:29:27 +0100 Subject: Reference Manual: Replace "it's" with "its" "Its" is a possessive pronoun, "it's" is a contraction of "it is". --- system/doc/reference_manual/expressions.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') diff --git a/system/doc/reference_manual/expressions.xml b/system/doc/reference_manual/expressions.xml index 714ecccaf6..1049c251d0 100644 --- a/system/doc/reference_manual/expressions.xml +++ b/system/doc/reference_manual/expressions.xml @@ -269,7 +269,7 @@ fun lists:append/2([1,2], [3,4]) set of auto-imported BIFs does not silently change the behavior of old code.

-

However, to avoid that old (pre R14) code changed it's +

However, to avoid that old (pre R14) code changed its behavior when compiled with OTP version R14A or later, the following restriction applies: If you override the name of a BIF that was auto-imported in OTP versions prior to R14A (ERTS version -- cgit v1.2.3 From 008acf7693328357a7b8f43c5abeb04625629df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Fri, 11 Mar 2011 16:28:26 +0100 Subject: Update release version in install README --- system/README | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'system') diff --git a/system/README b/system/README index 317030373c..234fc23dbd 100644 --- a/system/README +++ b/system/README @@ -1,7 +1,7 @@ -Erlang/OTP June 11, 2010 +Erlang/OTP March 11, 2011 -LAST MINUTE INFORMATION -- Release of Erlang 5.8/OTP R14A +LAST MINUTE INFORMATION -- Release of Erlang 5.8.3/OTP R14B02 1. GENERAL @@ -35,7 +35,7 @@ LAST MINUTE INFORMATION -- Release of Erlang 5.8/OTP R14A R11B-1). BEAM files from R10B or earlier are not supported. To get the best performance, you should recompile your - application code with the R13B04 compiler. + application code with the R14B02 compiler. 2. NOTES ABOUT THE SOLARIS VERSION @@ -61,7 +61,7 @@ LAST MINUTE INFORMATION -- Release of Erlang 5.8/OTP R14A 4.1 The following linux distributions/version combinations are supported and tested: - Suse 9.4 x86, Suse 10.1 x86 + Suse 9.4 x86, Suse 10.1 x86, Suse 10.1 x86_64 5. APPLICATIONS NOTES ------------------ -- cgit v1.2.3 From d53be747c945d5e86997e1944446795b271dacb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Fri, 11 Mar 2011 17:34:22 +0100 Subject: Update copyright years --- system/COPYRIGHT | 2 +- system/doc/design_principles/events.xml | 2 +- system/doc/design_principles/fsm.xml | 2 +- system/doc/design_principles/gen_server_concepts.xml | 2 +- system/doc/efficiency_guide/appendix.xml | 2 +- system/doc/efficiency_guide/binaryhandling.xml | 2 +- system/doc/efficiency_guide/myths.xml | 2 +- system/doc/embedded/intro.xml | 2 +- system/doc/embedded/vme_problems.xml | 2 +- system/doc/embedded/xntp.xml | 2 +- system/doc/reference_manual/errors.xml | 2 +- system/doc/reference_manual/expressions.xml | 2 +- system/doc/tutorial/c_port.xmlsrc | 2 +- system/doc/tutorial/nif.xmlsrc | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) (limited to 'system') diff --git a/system/COPYRIGHT b/system/COPYRIGHT index 444efcd6f5..94e9795b16 100644 --- a/system/COPYRIGHT +++ b/system/COPYRIGHT @@ -5,7 +5,7 @@ This software is subject to the following Copyrights and Licenses: %CopyrightBegin% -Copyright Ericsson AB 1997-2010. All Rights Reserved. +Copyright Ericsson AB 1997-2011. All Rights Reserved. The contents of this file are subject to the Erlang Public License, Version 1.1, (the "License"); you may not use this file except in diff --git a/system/doc/design_principles/events.xml b/system/doc/design_principles/events.xml index fab9e8305e..23a9b8c7bc 100644 --- a/system/doc/design_principles/events.xml +++ b/system/doc/design_principles/events.xml @@ -4,7 +4,7 @@

- 19972009 + 19972011 Ericsson AB. All Rights Reserved. diff --git a/system/doc/design_principles/fsm.xml b/system/doc/design_principles/fsm.xml index c3e9027274..edb2e20605 100644 --- a/system/doc/design_principles/fsm.xml +++ b/system/doc/design_principles/fsm.xml @@ -4,7 +4,7 @@
- 19972009 + 19972011 Ericsson AB. All Rights Reserved. diff --git a/system/doc/design_principles/gen_server_concepts.xml b/system/doc/design_principles/gen_server_concepts.xml index 231333da0e..a904390999 100644 --- a/system/doc/design_principles/gen_server_concepts.xml +++ b/system/doc/design_principles/gen_server_concepts.xml @@ -4,7 +4,7 @@
- 19972009 + 19972011 Ericsson AB. All Rights Reserved. diff --git a/system/doc/efficiency_guide/appendix.xml b/system/doc/efficiency_guide/appendix.xml index 631ef9bee7..6eaaeffbc4 100644 --- a/system/doc/efficiency_guide/appendix.xml +++ b/system/doc/efficiency_guide/appendix.xml @@ -5,7 +5,7 @@
2002 - 2007 + 2011 Ericsson AB, All Rights Reserved diff --git a/system/doc/efficiency_guide/binaryhandling.xml b/system/doc/efficiency_guide/binaryhandling.xml index 8746de4b60..3628d7a232 100644 --- a/system/doc/efficiency_guide/binaryhandling.xml +++ b/system/doc/efficiency_guide/binaryhandling.xml @@ -5,7 +5,7 @@
2007 - 2007 + 2011 Ericsson AB, All Rights Reserved diff --git a/system/doc/efficiency_guide/myths.xml b/system/doc/efficiency_guide/myths.xml index 65113c9372..6fdeb5c4f9 100644 --- a/system/doc/efficiency_guide/myths.xml +++ b/system/doc/efficiency_guide/myths.xml @@ -5,7 +5,7 @@
2007 - 2007 + 2011 Ericsson AB, All Rights Reserved diff --git a/system/doc/embedded/intro.xml b/system/doc/embedded/intro.xml index 3eafffd6fa..545500c9c9 100644 --- a/system/doc/embedded/intro.xml +++ b/system/doc/embedded/intro.xml @@ -5,7 +5,7 @@
1997 - 2007 + 2011 Ericsson AB, All Rights Reserved diff --git a/system/doc/embedded/vme_problems.xml b/system/doc/embedded/vme_problems.xml index 7f9b929875..03a70bae3b 100644 --- a/system/doc/embedded/vme_problems.xml +++ b/system/doc/embedded/vme_problems.xml @@ -5,7 +5,7 @@
1997 - 2007 + 2011 Ericsson AB, All Rights Reserved diff --git a/system/doc/embedded/xntp.xml b/system/doc/embedded/xntp.xml index 564b63fc7d..270d986cf1 100644 --- a/system/doc/embedded/xntp.xml +++ b/system/doc/embedded/xntp.xml @@ -5,7 +5,7 @@
1997 - 2007 + 2011 Ericsson AB, All Rights Reserved diff --git a/system/doc/reference_manual/errors.xml b/system/doc/reference_manual/errors.xml index 2160398700..4e207021d3 100644 --- a/system/doc/reference_manual/errors.xml +++ b/system/doc/reference_manual/errors.xml @@ -4,7 +4,7 @@
- 20032009 + 20032011 Ericsson AB. All Rights Reserved. diff --git a/system/doc/reference_manual/expressions.xml b/system/doc/reference_manual/expressions.xml index 1049c251d0..497d7eb464 100644 --- a/system/doc/reference_manual/expressions.xml +++ b/system/doc/reference_manual/expressions.xml @@ -4,7 +4,7 @@
- 20032010 + 20032011 Ericsson AB. All Rights Reserved. diff --git a/system/doc/tutorial/c_port.xmlsrc b/system/doc/tutorial/c_port.xmlsrc index b4caa07578..b139fe0678 100644 --- a/system/doc/tutorial/c_port.xmlsrc +++ b/system/doc/tutorial/c_port.xmlsrc @@ -4,7 +4,7 @@
- 20002009 + 20002011 Ericsson AB. All Rights Reserved. diff --git a/system/doc/tutorial/nif.xmlsrc b/system/doc/tutorial/nif.xmlsrc index f9197c69dd..6cb54ff7ff 100644 --- a/system/doc/tutorial/nif.xmlsrc +++ b/system/doc/tutorial/nif.xmlsrc @@ -4,7 +4,7 @@
- 20002009 + 20002011 Ericsson AB. All Rights Reserved. -- cgit v1.2.3